Fix some React lifecycle and rendering errors that exist in build

This commit is contained in:
Gabe Kangas
2023-01-10 16:39:12 -08:00
parent e9d43492d0
commit d8a5380b7f
16 changed files with 85 additions and 102 deletions

View File

@@ -1,10 +1,21 @@
import React, { useState, useEffect } from 'react';
import { Table, Tag, Space, Button, Modal, Checkbox, Input, Typography, Row, Col } from 'antd';
import {
Table,
Tag,
Space,
Button,
Modal,
Checkbox,
Input,
Typography,
Row,
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,
@@ -14,12 +25,6 @@ import {
const { Title, Paragraph } = Typography;
// Lazy loaded components
const Tooltip = dynamic(() => import('antd').then(mod => mod.Tooltip), {
ssr: false,
});
const availableScopes = {
CAN_SEND_SYSTEM_MESSAGES: {
name: 'System messages',

View File

@@ -1,17 +1,22 @@
/* eslint-disable react/destructuring-assignment */
import { DeleteOutlined } from '@ant-design/icons';
import { Button, Checkbox, Col, Input, Modal, Row, Space, Table, Tag, Typography } from 'antd';
import dynamic from 'next/dynamic';
import {
Button,
Checkbox,
Col,
Input,
Modal,
Row,
Space,
Table,
Tag,
Typography,
Tooltip,
} from 'antd';
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), {
ssr: false,
});
const { Title, Paragraph } = Typography;
const availableEvents = {