Fix some React lifecycle and rendering errors that exist in build

This commit is contained in:
Gabe Kangas
2023-01-10 16:39:12 -08:00
parent e9d43492d0
commit d8a5380b7f
16 changed files with 85 additions and 102 deletions

View File

@ -4,7 +4,7 @@ import Link from 'next/link';
import Head from 'next/head';
import { differenceInSeconds } from 'date-fns';
import { useRouter } from 'next/router';
import { Layout, Menu, Alert, Button, Space } from 'antd';
import { Layout, Menu, Alert, Button, Space, Tooltip } from 'antd';
import {
SettingOutlined,
HomeOutlined,
@ -19,7 +19,6 @@ import {
} from '@ant-design/icons';
import classNames from 'classnames';
import dynamic from 'next/dynamic';
import { upgradeVersionAvailable } from '../../utils/apis';
import { parseSecondsToDurationString } from '../../utils/format';
@ -34,12 +33,6 @@ import { UpdateArgs } from '../../types/config-section';
import FediverseIcon from '../../assets/images/fediverse-black.png';
// Lazy loaded components
const Tooltip = dynamic(() => import('antd').then(mod => mod.Tooltip), {
ssr: false,
});
export type MainLayoutProps = {
children: ReactNode;
};