chore: remove currentWorkspaceId & currentMetaWorkspace

This commit is contained in:
QiShaoXuan
2023-01-11 16:33:25 +08:00
parent 8e8e18fdf9
commit 926bb7fd14
19 changed files with 37 additions and 116 deletions

View File

@@ -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 ? (
<>