♻️ reset firn

This commit is contained in:
Fred KISSIE
2026-01-20 02:57:27 +01:00
committed by Owen Schwartz
parent b7df8b7319
commit e09cd6c16c

View File

@@ -1,7 +1,7 @@
"use client"; "use client";
import { zodResolver } from "@hookform/resolvers/zod"; import { zodResolver } from "@hookform/resolvers/zod";
import { useActionState, useState } from "react"; import { startTransition, useActionState, useState } from "react";
import { useForm } from "react-hook-form"; import { useForm } from "react-hook-form";
import z from "zod"; import z from "zod";
import { import {
@@ -166,6 +166,7 @@ export default function AuthPageBrandingForm({
title: t("success"), title: t("success"),
description: t("authPageBrandingRemoved") description: t("authPageBrandingRemoved")
}); });
form.reset();
} }
} catch (error) { } catch (error) {
toast({ toast({
@@ -400,22 +401,23 @@ export default function AuthPageBrandingForm({
<div className="flex justify-end gap-2 mt-6 items-center"> <div className="flex justify-end gap-2 mt-6 items-center">
{branding && ( {branding && (
<Button <form action={deleteFormAction}>
variant="destructive" <Button
type="button" variant="destructive"
loading={isUpdatingBranding || isDeletingBranding} type="submit"
disabled={ loading={
isUpdatingBranding || isUpdatingBranding || isDeletingBranding
isDeletingBranding || }
!isPaidUser disabled={
} isUpdatingBranding ||
onClick={() => { isDeletingBranding ||
deleteFormAction(); !isPaidUser
}} }
className="gap-1" className="gap-1"
> >
{t("removeAuthPageBranding")} {t("removeAuthPageBranding")}
</Button> </Button>
</form>
)} )}
<Button <Button
type="submit" type="submit"