fix: resolved recursion issue in select

This commit is contained in:
Akhil Mohan
2023-12-12 22:29:38 +05:30
parent e50c89e326
commit d2f959558e
3 changed files with 9368 additions and 309 deletions
@@ -88,10 +88,12 @@ export const AddServiceTokenModal = ({ popUp, handlePopUpToggle }: Props) => {
} = useForm<FormData>({
resolver: yupResolver(schema),
defaultValues: {
scopes: [{
secretPath: "/",
environment: currentWorkspace?.environments?.[0]?.slug
}]
scopes: [
{
secretPath: "/",
environment: currentWorkspace?.environments?.[0]?.slug
}
]
}
});
@@ -136,7 +138,7 @@ export const AddServiceTokenModal = ({ popUp, handlePopUpToggle }: Props) => {
plaintext: key,
key: randomBytes
});
const { serviceToken } = await createServiceToken.mutateAsync({
encryptedKey: ciphertext,
iv,
@@ -279,7 +281,7 @@ export const AddServiceTokenModal = ({ popUp, handlePopUpToggle }: Props) => {
className="w-full"
>
{apiTokenExpiry.map(({ label, value }) => (
<SelectItem value={String(value || "")} key={label}>
<SelectItem value={String(value)} key={label}>
{label}
</SelectItem>
))}