web & sdk: improved sdk (better failover and batching)

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-01-12 11:31:46 +01:00
parent 8e7558790e
commit 5b5ad23f66
26 changed files with 1266 additions and 377 deletions

View File

@@ -19,6 +19,7 @@ interface EditClientProps {
const validator = z.object({
id: z.string().min(1),
name: z.string().min(1),
cors: z.string().min(1),
});
type IForm = z.infer<typeof validator>;
@@ -43,6 +44,7 @@ export default function EditClient({ id }: EditClientProps) {
defaultValues: {
id: '',
name: '',
cors: '',
},
});
@@ -60,7 +62,18 @@ export default function EditClient({ id }: EditClientProps) {
mutation.mutate(values);
})}
>
<InputWithLabel label="Name" placeholder="Name" {...register('name')} />
<div className="flex flex-col gap-4">
<InputWithLabel
label="Name"
placeholder="Name"
{...register('name')}
/>
<InputWithLabel
label="Cors"
placeholder="Cors"
{...register('cors')}
/>
</div>
<ButtonContainer>
<Button type="button" variant="outline" onClick={() => popModal()}>
Cancel