mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-26 02:35:58 +08:00
chore: remove currentWorkspaceId & currentMetaWorkspace
This commit is contained in:
@@ -22,15 +22,13 @@ const isMac = () => {
|
||||
return getUaHelper().isMacOs;
|
||||
};
|
||||
export const QuickSearch = ({ open, onClose }: TransitionsModalProps) => {
|
||||
const { currentMetaWorkSpace } = useAppState();
|
||||
const { currentWorkspace } = useAppState();
|
||||
|
||||
const [query, setQuery] = useState('');
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [showCreatePage, setShowCreatePage] = useState(true);
|
||||
const { triggerQuickSearchModal } = useModal();
|
||||
|
||||
const isPublish = currentMetaWorkSpace?.published;
|
||||
|
||||
// Add ‘⌘+K’ shortcut keys as switches
|
||||
useEffect(() => {
|
||||
const down = (e: KeyboardEvent) => {
|
||||
@@ -96,7 +94,7 @@ export const QuickSearch = ({ open, onClose }: TransitionsModalProps) => {
|
||||
setShowCreatePage={setShowCreatePage}
|
||||
/>
|
||||
</StyledContent>
|
||||
{isPublish ? (
|
||||
{currentWorkspace?.isPublish ? (
|
||||
<></>
|
||||
) : showCreatePage ? (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user