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

@@ -1,8 +1,8 @@
// This content populates the video variant modal, which is spawned from the variants table. This relies on the `dataState` prop fed in by the table.
import React, { FC } from 'react';
import { Popconfirm, Row, Col, Slider, Collapse, Typography, Alert, Button } from 'antd';
import { ExclamationCircleFilled } from '@ant-design/icons';
import classNames from 'classnames';
import dynamic from 'next/dynamic';
import { FieldUpdaterFunc, VideoVariant, UpdateArgs } from '../../types/config-section';
import { TextField } from './TextField';
import {
@@ -21,6 +21,12 @@ import { ToggleSwitch } from './ToggleSwitch';
const { Panel } = Collapse;
// Lazy loaded components
const ExclamationCircleFilled = dynamic(() => import('@ant-design/icons/ExclamationCircleFilled'), {
ssr: false,
});
export type VideoVariantFormProps = {
dataState: VideoVariant;
onUpdateField: FieldUpdaterFunc;