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

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

View File

@@ -6,7 +6,8 @@ import {
} from "@chakra-ui/react";
import { CreatableSelect, OptionBase } from "chakra-react-select";
import { Field, useFormikContext } from "formik";
import { intl } from "locale";
import { intl } from "src/locale";
interface SelectOption extends OptionBase {
label: string;
@@ -16,13 +17,12 @@ interface DomainNamesFieldProps {
maxDomains?: number;
isWildcardPermitted?: boolean;
dnsProviderWildcardSupported?: boolean;
onChange?: (i: string[]) => any;
// onChange?: (i: string[]) => any;
}
function DomainNamesField({
maxDomains,
isWildcardPermitted,
dnsProviderWildcardSupported,
onChange,
dnsProviderWildcardSupported, // onChange,
}: DomainNamesFieldProps) {
const { values, setFieldValue } = useFormikContext();
@@ -76,7 +76,7 @@ function DomainNamesField({
setFieldValue("domainNames", doms);
};
let helperTexts: string[] = [];
const helperTexts: string[] = [];
if (maxDomains) {
helperTexts.push(
intl.formatMessage({ id: "domain_names.max" }, { count: maxDomains }),
@@ -110,7 +110,7 @@ function DomainNamesField({
/>
{helperTexts.length
? helperTexts.map((i) => {
return <FormHelperText>{i}</FormHelperText>;
return <FormHelperText key={i}>{i}</FormHelperText>;
})
: null}
<FormErrorMessage>{form.errors.domainNames}</FormErrorMessage>