Feat: Add validation to avoid error when user doesnt have access to the store
This commit is contained in:
parent
8ac6cdb4d7
commit
113b47804f
1 changed files with 4 additions and 2 deletions
|
|
@ -43,8 +43,10 @@ export default function ShareModal({
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
}): JSX.Element {
|
}): JSX.Element {
|
||||||
function handleOpenWShortcut(e: KeyboardEvent) {
|
function handleOpenWShortcut(e: KeyboardEvent) {
|
||||||
e.preventDefault()
|
if (hasApiKey || hasStore) {
|
||||||
internalSetOpen(state => !state);
|
e.preventDefault()
|
||||||
|
internalSetOpen(state => !state);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const version = useDarkStore((state) => state.version);
|
const version = useDarkStore((state) => state.version);
|
||||||
const hasStore = useStoreStore((state) => state.hasStore);
|
const hasStore = useStoreStore((state) => state.hasStore);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue