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

@@ -17,10 +17,8 @@ export const Input = (props: {
const [isComposition, setIsComposition] = useState(false);
const [inputValue, setInputValue] = useState('');
const inputRef = useRef<HTMLInputElement>(null);
const { currentWorkspaceId, workspaceList, currentWorkspace } = useAppState();
const isPublish = workspaceList.find(
meta => String(meta.id) === String(currentWorkspaceId)
)?.published;
const { currentWorkspace } = useAppState();
useEffect(() => {
inputRef.current?.addEventListener(
'blur',
@@ -79,7 +77,7 @@ export const Input = (props: {
}
}}
placeholder={
isPublish
currentWorkspace?.isPublish
? `Search in ${currentWorkspace?.blocksuiteWorkspace?.meta.name}`
: 'Quick Search...'
}