Skip to content

Commit 4fa2639

Browse files
committed
corrections from biome
1 parent af3b434 commit 4fa2639

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

frontend/src/components/Wishlist.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// src/components/Wishlist.tsx
22
import { useMutation, useQuery } from "@apollo/client";
3-
import { useState } from "react";
3+
import { useId, useState } from "react";
44
import {
55
ADD_GIFT,
66
DELETE_GIFT,
@@ -31,6 +31,8 @@ export default function Wishlist() {
3131

3232
const [updateGift, { loading: updating }] = useMutation(UPDATE_GIFT);
3333

34+
const nameId = useId();
35+
3436
// hooks
3537
const addModal = useToggle(false);
3638
const editModal = useToggle(false);
@@ -214,11 +216,11 @@ export default function Wishlist() {
214216
<h2 className="text-xl font-bold text-dark mb-4">Ajouter une nouvelle idée</h2>
215217
<form onSubmit={handleSubmit} className="space-y-3">
216218
<div>
217-
<label htmlFor="name" className="block text-dark mb-1">
219+
<label htmlFor={nameId} className="block text-dark mb-1">
218220
Nom
219221
</label>
220222
<input
221-
id="name"
223+
id={nameId}
222224
type="text"
223225
name="name"
224226
value={formData.name}

frontend/tests/Wishlist.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,6 @@ describe("Wishlist", () => {
170170
expect(callArg.refetchQueries?.length).toBe(1);
171171
});
172172

173-
// todo : add test for editing a gift idea
173+
// todo : add test for editing, deleting a gift idea
174174

175175
});

0 commit comments

Comments
 (0)