From 5fdcf788faddac91c39dc584c0a42c8195ed2913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20Akg=C3=BCl?= <s86116@bht-berlin.de> Date: Wed, 31 May 2023 16:28:16 +0200 Subject: [PATCH] user follow list item --- components/user-item.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/components/user-item.tsx b/components/user-item.tsx index b24bb87..0da145d 100644 --- a/components/user-item.tsx +++ b/components/user-item.tsx @@ -1,23 +1,23 @@ -import { User } from "@/components/ui/user"; import Image from "next/image"; import Link from "next/link"; +import FollowButton from "./following-button"; // this is a single user helper-component, only for design purposes -export default function User({ id, userName, image }: { id: number, userName: string, image: { url: string } }) { +export default function FollowUser({ id, followId, userName, image }: { id: number, followId: number, userName: string, image: { url: string } }) { return ( - <User> + <div> <Link href={`/user/${id}`}> <div className=""> <Image src={image.url} alt={userName} - width={264} - height={374} - priority={true} - style={{ width: '100%', height: '100%' }} /> + width={50} + height={50} + priority={true} /> </div> + <p>{userName}</p> + <FollowButton userId={id} followerId={followId} /> </Link> - <p className="truncate">{userName}</p> - </User> + </div> ) } \ No newline at end of file -- GitLab