diff options
author | Samuel Newman <mozzius@protonmail.com> | 2023-12-20 17:50:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-20 09:50:50 -0800 |
commit | 4a93a5b6adefdf8d27cfbf54833ba50eb8fb2ef9 (patch) | |
tree | 1ddb5e43e5c15c99c61b9f97ab550bd1a42fcebd /src/view/shell/desktop/LeftNav.tsx | |
parent | 946b2c916308193822a9fb2ea89c8b0f2b54448d (diff) | |
download | voidsky-4a93a5b6adefdf8d27cfbf54833ba50eb8fb2ef9.tar.zst |
Invalid handle autocomplete (#2251)
* refactor invalid handle check from a previous PR to use util function * add invalid handle check to `prefixMatch`
Diffstat (limited to 'src/view/shell/desktop/LeftNav.tsx')
-rw-r--r-- | src/view/shell/desktop/LeftNav.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/view/shell/desktop/LeftNav.tsx b/src/view/shell/desktop/LeftNav.tsx index df6cb6499..f3c8c1d11 100644 --- a/src/view/shell/desktop/LeftNav.tsx +++ b/src/view/shell/desktop/LeftNav.tsx @@ -46,6 +46,7 @@ import {useComposerControls} from '#/state/shell/composer' import {useFetchHandle} from '#/state/queries/handle' import {emitSoftReset} from '#/state/events' import {NavSignupCard} from '#/view/shell/NavSignupCard' +import {isInvalidHandle} from '#/lib/strings/handles' function ProfileCard() { const {currentAccount} = useSession() @@ -221,7 +222,7 @@ function ComposeBtn() { if ( !handle || handle === currentAccount?.handle || - handle === 'handle.invalid' + isInvalidHandle(handle) ) return undefined |