Lazy load tooltip

This commit is contained in:
Gabe Kangas
2023-01-09 16:09:13 -08:00
parent bd3c81c353
commit 29882f1291
7 changed files with 46 additions and 32 deletions

View File

@@ -1,22 +1,15 @@
/* eslint-disable react/destructuring-assignment */
import { DeleteOutlined } from '@ant-design/icons';
import {
Button,
Checkbox,
Col,
Input,
Modal,
Row,
Space,
Table,
Tag,
Tooltip,
Typography,
} from 'antd';
import { Button, Checkbox, Col, Input, Modal, Row, Space, Table, Tag, Typography } from 'antd';
import dynamic from 'next/dynamic';
import React, { useEffect, useState } from 'react';
import { CREATE_WEBHOOK, DELETE_WEBHOOK, fetchData, WEBHOOKS } from '../../utils/apis';
import { isValidUrl, DEFAULT_TEXTFIELD_URL_PATTERN } from '../../utils/urls';
// Lazy loaded components
const Tooltip = dynamic(() => import('antd').then(mod => mod.Tooltip));
const { Title, Paragraph } = Typography;
const availableEvents = {