mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 11:59:51 +08:00
fix: remove mui theme provider (#2055)
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
import { MenuItem, MuiClickAwayListener, PureMenu } from '@affine/component';
|
||||
import {
|
||||
baseTheme,
|
||||
MenuItem,
|
||||
MuiClickAwayListener,
|
||||
PureMenu,
|
||||
} from '@affine/component';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import {
|
||||
MoreVerticalIcon,
|
||||
@@ -7,7 +12,6 @@ import {
|
||||
PlusIcon,
|
||||
} from '@blocksuite/icons';
|
||||
import type { PageMeta } from '@blocksuite/store';
|
||||
import { useTheme } from '@mui/material';
|
||||
import { useMemo, useRef, useState } from 'react';
|
||||
|
||||
import { useBlockSuiteMetaHelper } from '../../../../hooks/affine/use-block-suite-meta-helper';
|
||||
@@ -39,9 +43,6 @@ export const OperationButton = ({
|
||||
onMenuClose,
|
||||
onRename,
|
||||
}: OperationButtonProps) => {
|
||||
const {
|
||||
zIndex: { modal: modalIndex },
|
||||
} = useTheme();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const timer = useRef<ReturnType<typeof setTimeout>>();
|
||||
@@ -49,7 +50,7 @@ export const OperationButton = ({
|
||||
const [operationMenuOpen, setOperationMenuOpen] = useState(false);
|
||||
const [pinboardMenuOpen, setPinboardMenuOpen] = useState(false);
|
||||
const [confirmModalOpen, setConfirmModalOpen] = useState(false);
|
||||
const menuIndex = useMemo(() => modalIndex + 1, [modalIndex]);
|
||||
const menuIndex = useMemo(() => parseInt(baseTheme.zIndexModal) + 1, []);
|
||||
const { removeToTrash } = useBlockSuiteMetaHelper(blockSuiteWorkspace);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user