|
|
@@ -1,20 +1,20 @@
|
|
|
-import React, { ReactElement, ReactNode, useEffect } from 'react';
|
|
|
+import type { ReactElement, ReactNode } from 'react';
|
|
|
+import React, { useEffect } from 'react';
|
|
|
|
|
|
-import { NextPage } from 'next';
|
|
|
+import type { NextPage } from 'next';
|
|
|
import { appWithTranslation } from 'next-i18next';
|
|
|
-import { AppProps } from 'next/app';
|
|
|
+import type { AppProps } from 'next/app';
|
|
|
import { SWRConfig } from 'swr';
|
|
|
|
|
|
import * as nextI18nConfig from '^/config/next-i18next.config';
|
|
|
|
|
|
import { GlobalFonts } from '~/components/FontFamily/GlobalFonts';
|
|
|
-import { useI18nextHMR } from '~/services/i18next-hmr';
|
|
|
import {
|
|
|
useAppTitle, useConfidential, useGrowiVersion, useSiteUrl, useIsDefaultLogo, useForcedColorScheme,
|
|
|
} from '~/stores/context';
|
|
|
import { swrGlobalConfiguration } from '~/utils/swr-utils';
|
|
|
|
|
|
-import { CommonProps } from './utils/commons';
|
|
|
+import type { CommonProps } from './utils/commons';
|
|
|
import { registerTransformerForObjectId } from './utils/objectid-transformer';
|
|
|
|
|
|
import '~/styles/prebuilt/vendor.css';
|
|
|
@@ -22,8 +22,6 @@ import '~/styles/font-icons.scss';
|
|
|
import '~/styles/style-app.scss';
|
|
|
|
|
|
|
|
|
-const isDev = process.env.NODE_ENV === 'development';
|
|
|
-
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
|
export type NextPageWithLayout<P = {}, IP = P> = NextPage<P, IP> & {
|
|
|
getLayout?: (page: ReactElement) => ReactNode,
|
|
|
@@ -37,8 +35,6 @@ type GrowiAppProps = AppProps & {
|
|
|
registerTransformerForObjectId();
|
|
|
|
|
|
function GrowiApp({ Component, pageProps }: GrowiAppProps): JSX.Element {
|
|
|
- useI18nextHMR(isDev);
|
|
|
-
|
|
|
useEffect(() => {
|
|
|
import('bootstrap/dist/js/bootstrap');
|
|
|
}, []);
|