mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix: remove dynamic import on theme provider (#1111)
This commit is contained in:
@@ -24,6 +24,8 @@ type TransitionsModalProps = {
|
||||
const isMac = () => {
|
||||
return getUaHelper().isMacOs;
|
||||
};
|
||||
|
||||
// fixme(himself65): support ssr
|
||||
export const QuickSearch = ({ open, onClose }: TransitionsModalProps) => {
|
||||
const router = useRouter();
|
||||
const [query, setQuery] = useState('');
|
||||
|
||||
@@ -31,6 +31,7 @@ const isMac = () => {
|
||||
return getUaHelper().isMacOs;
|
||||
};
|
||||
|
||||
// fixme(himself65): support ssr
|
||||
export const ShortcutsModal = ({ open, onClose }: ModalProps) => {
|
||||
const { t } = useTranslation();
|
||||
const macMarkdownShortcuts = useMacMarkdownShortcuts();
|
||||
|
||||
@@ -9,7 +9,6 @@ import { useTranslation } from '@affine/i18n';
|
||||
import { Logger } from '@toeverything/pathfinder-logger';
|
||||
import type { NextPage } from 'next';
|
||||
import type { AppProps } from 'next/app';
|
||||
import dynamic from 'next/dynamic';
|
||||
import Head from 'next/head';
|
||||
// import AppStateProvider2 from '@/providers/app-state-provider2/provider';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -22,14 +21,11 @@ import { MessageCenterHandler } from '@/components/message-center-handler';
|
||||
import ProviderComposer from '@/components/provider-composer';
|
||||
import { AppStateProvider } from '@/providers/app-state-provider';
|
||||
import ConfirmProvider from '@/providers/ConfirmProvider';
|
||||
import { ThemeProvider } from '@/providers/ThemeProvider';
|
||||
import { GlobalAppProvider } from '@/store/app';
|
||||
import { DataCenterPreloader } from '@/store/app/datacenter';
|
||||
import { ModalProvider } from '@/store/globalModal';
|
||||
|
||||
const ThemeProvider = dynamic(() => import('@/providers/ThemeProvider'), {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
export type NextPageWithLayout<P = Record<string, unknown>, IP = P> = NextPage<
|
||||
P,
|
||||
IP
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import dynamic from 'next/dynamic';
|
||||
import { useRouter } from 'next/router';
|
||||
import type React from 'react';
|
||||
import {
|
||||
@@ -15,8 +16,14 @@ import ContactModal from '@/components/contact-modal';
|
||||
import { EnableWorkspaceModal } from '@/components/enable-workspace-modal';
|
||||
import ImportModal from '@/components/import';
|
||||
import { LoginModal } from '@/components/login-modal';
|
||||
import QuickSearch from '@/components/quick-search';
|
||||
import ShortcutsModal from '@/components/shortcuts-modal';
|
||||
|
||||
const ShortcutsModal = dynamic(() => import('@/components/shortcuts-modal'), {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
const QuickSearch = dynamic(() => import('@/components/quick-search'), {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
export type ModalState = {
|
||||
contact: boolean;
|
||||
|
||||
Reference in New Issue
Block a user