Fix some React lifecycle and rendering errors that exist in build

This commit is contained in:
Gabe Kangas
2023-01-10 16:39:20 -08:00
parent e9d43492d0
commit d8a5380b7f
16 changed files with 85 additions and 102 deletions
@@ -1,23 +1,16 @@
// Custom component for AntDesign Button that makes an api call, then displays a confirmation icon upon
import React, { useState, useEffect, FC } from 'react';
import { Button } from 'antd';
import { Button, Tooltip } from 'antd';
import {
EyeOutlined,
EyeInvisibleOutlined,
CheckCircleFilled,
ExclamationCircleFilled,
} from '@ant-design/icons';
import dynamic from 'next/dynamic';
import { fetchData, UPDATE_CHAT_MESSGAE_VIZ } from '../../utils/apis';
import { MessageType } from '../../types/chat';
import { isEmptyObject } from '../../utils/format';
// Lazy loaded components
const Tooltip = dynamic(() => import('antd').then(mod => mod.Tooltip), {
ssr: false,
});
export type MessageToggleProps = {
isVisible: boolean;
message: MessageType;