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
@@ -1,9 +1,17 @@
import { VerticalAlignBottomOutlined } from '@ant-design/icons';
import { Button } from 'antd';
import dynamic from 'next/dynamic';
import { FC, MutableRefObject } from 'react';
import { ChatMessage } from '../../../interfaces/chat-message.model';
import styles from './ChatContainer.module.scss';
// Lazy loaded components
const VerticalAlignBottomOutlined = dynamic(
() => import('@ant-design/icons/VerticalAlignBottomOutlined'),
{
ssr: false,
},
);
type Props = {
chatContainerRef: MutableRefObject<any>;
messages: ChatMessage[];