style(teams): apply biome formatting and remove unused test import
This commit is contained in:
@@ -29,10 +29,7 @@ export default function TeamCreateForm({
|
||||
submitButtonCopy: SubmitButtonCopy
|
||||
}) {
|
||||
const router = useRouter()
|
||||
const schema = useMemo(
|
||||
() => buildCreateTeamSchema(schemaCopy),
|
||||
[schemaCopy],
|
||||
)
|
||||
const schema = useMemo(() => buildCreateTeamSchema(schemaCopy), [schemaCopy])
|
||||
|
||||
const {
|
||||
register,
|
||||
|
||||
@@ -7,6 +7,10 @@ import { useMemo, useState } from "react"
|
||||
import { useForm } from "react-hook-form"
|
||||
import { toast } from "sonner"
|
||||
import { updateTeamAction } from "@/actions/team.actions"
|
||||
import {
|
||||
SubmitButton,
|
||||
type SubmitButtonCopy,
|
||||
} from "@/components/forms/submitButton"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import {
|
||||
Dialog,
|
||||
@@ -18,10 +22,6 @@ import {
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from "@/components/ui/dialog"
|
||||
import {
|
||||
SubmitButton,
|
||||
type SubmitButtonCopy,
|
||||
} from "@/components/forms/submitButton"
|
||||
import type { Dictionary } from "@/i18n/dictionaries"
|
||||
import {
|
||||
buildUpdateTeamSchema,
|
||||
@@ -48,10 +48,7 @@ export default function TeamEditForm({
|
||||
}) {
|
||||
const router = useRouter()
|
||||
const [open, setOpen] = useState(false)
|
||||
const schema = useMemo(
|
||||
() => buildUpdateTeamSchema(schemaCopy),
|
||||
[schemaCopy],
|
||||
)
|
||||
const schema = useMemo(() => buildUpdateTeamSchema(schemaCopy), [schemaCopy])
|
||||
|
||||
const {
|
||||
register,
|
||||
@@ -108,7 +105,10 @@ export default function TeamEditForm({
|
||||
</DialogHeader>
|
||||
<input type="hidden" {...register("id")} />
|
||||
<div className="flex flex-col gap-2">
|
||||
<label htmlFor={`team-name-${team.id}`} className="mb-2 block text-lg">
|
||||
<label
|
||||
htmlFor={`team-name-${team.id}`}
|
||||
className="mb-2 block text-lg"
|
||||
>
|
||||
{formCopy.nameLabel}
|
||||
</label>
|
||||
<input
|
||||
@@ -118,9 +118,7 @@ export default function TeamEditForm({
|
||||
{...register("name")}
|
||||
className={`w-full rounded-lg border px-4 py-2 ${errors.name ? "border-error" : ""}`}
|
||||
/>
|
||||
{errors.name && (
|
||||
<p className="text-error">{errors.name.message}</p>
|
||||
)}
|
||||
{errors.name && <p className="text-error">{errors.name.message}</p>}
|
||||
</div>
|
||||
<DialogFooter>
|
||||
<DialogClose asChild>
|
||||
|
||||
Reference in New Issue
Block a user