Lazy load every instance of using ant icons. Closes #2583
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { DeleteOutlined } from '@ant-design/icons';
|
||||
import { Button, Space, Table, Typography, Upload } from 'antd';
|
||||
import { RcFile } from 'antd/lib/upload';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import dynamic from 'next/dynamic';
|
||||
import FormStatusIndicator from '../../../components/admin/FormStatusIndicator';
|
||||
|
||||
import { DELETE_EMOJI, fetchData, UPLOAD_EMOJI } from '../../../utils/apis';
|
||||
@@ -16,6 +16,12 @@ import {
|
||||
import { RESET_TIMEOUT } from '../../../utils/config-constants';
|
||||
import { URL_CUSTOM_EMOJIS } from '../../../utils/constants';
|
||||
|
||||
// Lazy loaded components
|
||||
|
||||
const DeleteOutlined = dynamic(() => import('@ant-design/icons/DeleteOutlined'), {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
type CustomEmoji = {
|
||||
name: string;
|
||||
url: string;
|
||||
|
||||
Reference in New Issue
Block a user