♻️ 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 && (
<form action={deleteFormAction}>
<Button <Button
variant="destructive" variant="destructive"
type="button" type="submit"
loading={isUpdatingBranding || isDeletingBranding} loading={
isUpdatingBranding || isDeletingBranding
}
disabled={ disabled={
isUpdatingBranding || isUpdatingBranding ||
isDeletingBranding || isDeletingBranding ||
!isPaidUser !isPaidUser
} }
onClick={() => {
deleteFormAction();
}}
className="gap-1" className="gap-1"
> >
{t("removeAuthPageBranding")} {t("removeAuthPageBranding")}
</Button> </Button>
</form>
)} )}
<Button <Button
type="submit" type="submit"