Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
fix: search repsonsive (#1751)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yazdun committed Sep 15, 2022
1 parent 590a451 commit 9971fd4
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions components/user/UserPreview.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
import Image from "next/image";
import Link from "next/link";

export default function UserPreview({ profile }) {
return (
<a
href={`/${profile.username}`}
className="flex gap-x-6 rounded-full border-2 border-gray-200 hover:border-gray-500 p-4 my-2"
>
<Image
src={profile.avatar}
alt={`Profile picture of ${profile.name}`}
width={80}
height={80}
className="rounded-full"
/>
<div>
<h3 className="text-2xl font-bold">{profile.name}</h3>
<p>{profile.bio}</p>
</div>
</a>
<Link href={`/${profile.username}`}>
<a className="flex flex-col gap-x-6 rounded md:rounded-full md:flex-row border-2 border-gray-200 hover:border-gray-500 p-4 my-2">
<div className="flex items-center gap-5">
<div className="min-w-[5rem]">
<Image
src={profile.avatar}
alt={`Profile picture of ${profile.name}`}
width={80}
height={80}
className="rounded-full"
/>
</div>
<h3 className="text-2xl font-bold md:hidden">{profile.name}</h3>
</div>
<div>
<h3 className="hidden md:block text-2xl font-bold">{profile.name}</h3>
<p>{profile.bio}</p>
</div>
</a>
</Link>
);
}

0 comments on commit 9971fd4

Please sign in to comment.