prod setup

This commit is contained in:
Johan LEROY
2026-05-04 11:00:44 +02:00
parent 7c7ff160eb
commit 5d05cd4c04
46 changed files with 2016 additions and 190 deletions

View File

@@ -0,0 +1,17 @@
import { useFormContext, get } from 'react-hook-form';
type Props = { name: string };
export function FieldError({ name }: Props) {
const {
formState: { errors },
} = useFormContext();
const error = get(errors, name);
if (!error?.message) return null;
return (
<p className="mt-1 flex items-center gap-2 font-mono text-xs text-[color:var(--color-magenta)]">
<span className="led led-red animate-led-red" />
<span>{String(error.message)}</span>
</p>
);
}