We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f52f5fb commit f5dfbdaCopy full SHA for f5dfbda
resources/js/components/Shortlist.tsx
@@ -37,26 +37,21 @@ export function Shortlist({
37
<p className="px-3 text-sm text-slate-800">
38
{puppy.name}
39
</p>
40
- <DeleteButton
41
- id={puppy.id}
42
- />
+ <DeleteButton puppy={puppy} />
43
</li>
44
))}
45
</ul>
46
</div>
47
);
48
}
49
50
-function DeleteButton({
51
- id,
52
-}: {
53
- id: Puppy['id'];
54
-}) {
+function DeleteButton({ puppy }: { puppy: Puppy }) {
55
const [pending, setPending] = useState(false);
56
return (
57
<Link
+ preserveScroll
58
method={'patch'}
59
- // href={like(puppy.id)}
+ href={like(puppy.id)}
60
// onClick={async () => {
61
// setPending(true);
62
// const updatedPuppy = await toggleLikedStatus(id);
0 commit comments