mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-07 16:34:24 +01:00
chore: add profile url to author card
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import dayjs from "dayjs";
|
||||
import { Link } from "react-router-dom";
|
||||
import Button from "src/Components/Button/Button";
|
||||
import { Author } from "src/features/Posts/types";
|
||||
import Avatar from "src/features/Profiles/Components/Avatar/Avatar";
|
||||
@@ -16,13 +17,19 @@ export default function AuthorCard({ author }: Props) {
|
||||
return (
|
||||
<div className="bg-white p-16 border rounded-8">
|
||||
<div className='flex gap-8'>
|
||||
<Avatar width={48} src={author.avatar} />
|
||||
<Link to={`/profile/${author.id}`}>
|
||||
<Avatar width={48} src={author.avatar} />
|
||||
</Link>
|
||||
<div className="overflow-hidden">
|
||||
<p className={`'text-body4' text-black font-medium overflow-hidden text-ellipsis whitespace-nowrap`}>{trimText(author.name, 333)}</p>
|
||||
<p className={`text-body6 text-gray-600`}>Joined on {dayjs(author.join_date).format('MMMM DD, YYYY')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<Button fullWidth color="primary" className="mt-16">
|
||||
<Button
|
||||
fullWidth
|
||||
href={`/profile/${author.id}`}
|
||||
color="primary"
|
||||
className="mt-16">
|
||||
Follow
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user