add next app
This commit is contained in:
24
web/src/app/(home)/UserWishlists.tsx
Normal file
24
web/src/app/(home)/UserWishlists.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
"use client";
|
||||
|
||||
import { useUserWishlistsQuery } from "@/api/wishlists";
|
||||
import Link from "next/link";
|
||||
|
||||
export const UserWishlists = () => {
|
||||
const { data } = useUserWishlistsQuery();
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h2 className="text-xl font-semibold">Your wishlists</h2>
|
||||
<div className="flex flex-col gap-2 mt-2">
|
||||
{data?.map((wishlist) => (
|
||||
<div key={wishlist.uuid}>
|
||||
<Link href={`/wishlists/${wishlist.uuid}`}>
|
||||
<span>{wishlist.name}</span>
|
||||
</Link>
|
||||
<p>{wishlist.description}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user