refactor(hooks): reduce null types (#3111)

(cherry picked from commit 8b5d997322)
This commit is contained in:
Alex Yang
2023-07-09 13:01:09 +08:00
parent fdffac6911
commit 0ddbe89d88
8 changed files with 31 additions and 58 deletions
@@ -30,7 +30,7 @@ export const WorkspaceDeleteModal = ({
onDeleteWorkspace,
}: WorkspaceDeleteProps) => {
const [workspaceName] = useBlockSuiteWorkspaceName(
workspace.blockSuiteWorkspace ?? null
workspace.blockSuiteWorkspace
);
const [deleteStr, setDeleteStr] = useState<string>('');
const allowDelete = deleteStr === workspaceName;