mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
refactor(store): port to useGlobalState with zustand (#1012)
This commit is contained in:
@@ -24,12 +24,14 @@ import { useTranslation } from '@affine/i18n';
|
||||
import { CameraIcon } from './icons';
|
||||
import { Upload } from '@/components/file-upload';
|
||||
import { MuiFade } from '@affine/component';
|
||||
import { useGlobalState } from '@/store/app';
|
||||
export const GeneralPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
|
||||
const [showDelete, setShowDelete] = useState<boolean>(false);
|
||||
const [showLeave, setShowLeave] = useState<boolean>(false);
|
||||
const [workspaceName, setWorkspaceName] = useState<string>(workspace?.name);
|
||||
const [showEditInput, setShowEditInput] = useState(false);
|
||||
const { currentWorkspace, isOwner } = useAppState();
|
||||
const isOwner = useGlobalState(store => store.isOwner);
|
||||
const { currentWorkspace } = useAppState();
|
||||
const { updateWorkspace } = useWorkspaceHelper();
|
||||
const { t } = useTranslation();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user