feat: add Modal component to common ui

This commit is contained in:
QiShaoXuan
2022-10-31 15:18:22 +08:00
parent 1bf6546144
commit a11306bf89
8 changed files with 148 additions and 3106 deletions
+2 -2
View File
@@ -66,11 +66,11 @@ const BrowserWarning = ({ onClose }: { onClose: () => void }) => {
export const Header = () => {
const [title, setTitle] = useState('');
const [isHover, setIsHover] = useState(false);
const [showWarning, setShowWarning] = useState(shouldShowWarning());
const { contactModalHandler } = useModal();
const { editor } = useEditor();
const [showWarning, setShowWarning] = useState(shouldShowWarning());
useEffect(() => {
if (editor) {
setTitle(editor.model.title || '');