Converted to Vite since create-react-app is no longer being developed

This commit is contained in:
Jamie Curnow committed 2023-07-20 15:11:41 +10:00
1 parent 824a22efad
commit 6d6021c9bb
115 files changed
+2511 -10015

No files matched your search

+10 -9
View File
@@ -1,5 +1,8 @@
import { useEffect, useMemo, useState } from "react";
import { FiDownload, FiEdit, FiRefreshCw, FiTrash2 } from "react-icons/fi";
import { useSortBy, useFilters, useTable, usePagination } from "react-table";
import {
tableEvents,
ActionsFormatter,
@@ -13,11 +16,9 @@ import {
TablePagination,
TableSortBy,
TextFilter,
} from "components";
import { intl } from "locale";
import { CertificateEditModal } from "modals";
import { FiDownload, FiEdit, FiRefreshCw, FiTrash2 } from "react-icons/fi";
import { useSortBy, useFilters, useTable, usePagination } from "react-table";
} from "src/components";
import { intl } from "src/locale";
import { CertificateEditModal } from "src/modals";
export interface TableProps {
data: any;
@@ -78,7 +79,7 @@ function Table({
title: intl.formatMessage({
id: "action.edit",
}),
onClick: (e: any, { id }: any) => alert(id),
onClick: (_: any, { id }: any) => alert(id),
icon: <FiEdit />,
disabled: (data: any) =>
data.type === "dns" || data.type === "http",
@@ -87,7 +88,7 @@ function Table({
title: intl.formatMessage({
id: "action.renew",
}),
onClick: (e: any, { id }: any) => onRenewal(id),
onClick: (_: any, { id }: any) => onRenewal(id),
icon: <FiRefreshCw />,
disabled: (data: any) =>
data.type !== "dns" && data.type !== "http",
@@ -96,7 +97,7 @@ function Table({
title: intl.formatMessage({
id: "action.download",
}),
onClick: (e: any, { id }: any) => alert(id),
onClick: (_: any, { id }: any) => alert(id),
icon: <FiDownload />,
disabled: (data: any) => data.isReadonly,
},
@@ -104,7 +105,7 @@ function Table({
title: intl.formatMessage({
id: "action.delete",
}),
onClick: (e: any, { id }: any) => alert(id),
onClick: (_: any, { id }: any) => alert(id),
icon: <FiTrash2 />,
disabled: (data: any) => data.isReadonly,
},
@@ -1,11 +1,12 @@
import { useEffect, useReducer, useState } from "react";
import { Alert, AlertIcon, useToast } from "@chakra-ui/react";
import { renewCertificate } from "api/npm";
import { EmptyList, SpinnerPage, tableEventReducer } from "components";
import { useCertificates } from "hooks";
import { intl } from "locale";
import { useQueryClient } from "react-query";
import { useQueryClient } from "@tanstack/react-query";
import { renewCertificate } from "src/api/npm";
import { EmptyList, SpinnerPage, tableEventReducer } from "src/components";
import { useCertificates } from "src/hooks";
import { intl } from "src/locale";
import Table from "./Table";
@@ -54,7 +55,7 @@ function TableWrapper() {
isClosable: true,
});
setTimeout(() => {
queryClient.invalidateQueries("certificates");
queryClient.invalidateQueries(["certificates"]);
}, 500);
} catch (err: any) {
toast({
+5 -4
View File
@@ -8,12 +8,13 @@ import {
MenuItem,
MenuDivider,
} from "@chakra-ui/react";
import { HelpDrawer, PrettyMenuButton } from "components";
import { useDNSProviders } from "hooks";
import { intl } from "locale";
import { CertificateCreateModal } from "modals";
import { FiGlobe, FiServer, FiShieldOff, FiUpload } from "react-icons/fi";
import { HelpDrawer, PrettyMenuButton } from "src/components";
import { useDNSProviders } from "src/hooks";
import { intl } from "src/locale";
import { CertificateCreateModal } from "src/modals";
import TableWrapper from "./TableWrapper";
function Certificates() {