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;
|
||||
}): JSX.Element {
|
||||
function handleOpenWShortcut(e: KeyboardEvent) {
|
||||
e.preventDefault()
|
||||
internalSetOpen(state => !state);
|
||||
if (hasApiKey || hasStore) {
|
||||
e.preventDefault()
|
||||
internalSetOpen(state => !state);
|
||||
}
|
||||
}
|
||||
const version = useDarkStore((state) => state.version);
|
||||
const hasStore = useStoreStore((state) => state.hasStore);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue