mirror of
https://github.com/owncast/owncast.git
synced 2025-11-02 11:56:57 +08:00
Lazy load every instance of using ant icons. Closes #2583
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
import React, { FC, useContext, useState } from 'react';
|
||||
import { Typography, Table, Modal, Button, Alert } from 'antd';
|
||||
import { ColumnsType } from 'antd/lib/table';
|
||||
import { DeleteOutlined } from '@ant-design/icons';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { ServerStatusContext } from '../../utils/server-status-context';
|
||||
import { AlertMessageContext } from '../../utils/alert-message-context';
|
||||
import { UpdateArgs, VideoVariant } from '../../types/config-section';
|
||||
@ -28,6 +28,12 @@ import { FormStatusIndicator } from './FormStatusIndicator';
|
||||
|
||||
const { Title } = Typography;
|
||||
|
||||
// Lazy loaded components
|
||||
|
||||
const DeleteOutlined = dynamic(() => import('@ant-design/icons/DeleteOutlined'), {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export const CurrentVariantsTable: FC = () => {
|
||||
const [displayModal, setDisplayModal] = useState(false);
|
||||
|
||||
Reference in New Issue
Block a user