Lazy load every instance of using ant icons. Closes #2583
This commit is contained in:
@@ -12,10 +12,10 @@ import {
|
||||
Col,
|
||||
Tooltip,
|
||||
} from 'antd';
|
||||
import { DeleteOutlined } from '@ant-design/icons';
|
||||
|
||||
import format from 'date-fns/format';
|
||||
|
||||
import dynamic from 'next/dynamic';
|
||||
import {
|
||||
fetchData,
|
||||
ACCESS_TOKENS,
|
||||
@@ -25,6 +25,12 @@ import {
|
||||
|
||||
const { Title, Paragraph } = Typography;
|
||||
|
||||
// Lazy loaded components
|
||||
|
||||
const DeleteOutlined = dynamic(() => import('@ant-design/icons/DeleteOutlined'), {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
const availableScopes = {
|
||||
CAN_SEND_SYSTEM_MESSAGES: {
|
||||
name: 'System messages',
|
||||
|
||||
Reference in New Issue
Block a user