Lazy load every instance of using ant icons. Closes #2583

This commit is contained in:
Gabe Kangas
2023-01-15 22:31:36 -08:00
parent 3986fcd032
commit 6fbd6cbbcf
43 changed files with 537 additions and 91 deletions

View File

@@ -2,10 +2,16 @@ import { Table, Button } from 'antd';
import format from 'date-fns/format';
import { SortOrder } from 'antd/lib/table/interface';
import React, { FC } from 'react';
import { StopTwoTone } from '@ant-design/icons';
import dynamic from 'next/dynamic';
import { User } from '../../types/chat';
import { BANNED_IP_REMOVE, fetchData } from '../../utils/apis';
// Lazy loaded components
const StopTwoTone = dynamic(() => import('@ant-design/icons/StopTwoTone'), {
ssr: false,
});
function formatDisplayDate(date: string | Date) {
return format(new Date(date), 'MMM d H:mma');
}