|
1 | | -import { FaRegComment } from "react-icons/fa6"; |
| 1 | +"use client"; |
2 | 2 | import { BiRepost } from "react-icons/bi"; |
3 | | -import { UserAvatar } from "./usrAvatar"; |
| 3 | +import { FaRegBookmark, FaRegComment } from "react-icons/fa6"; |
4 | 4 | import { FiHeart } from "react-icons/fi"; |
5 | 5 | import { IoIosStats } from "react-icons/io"; |
6 | | -import { FaRegBookmark } from "react-icons/fa6"; |
7 | 6 | import { RiShare2Line } from "react-icons/ri"; |
8 | | -<RiShare2Line />; |
9 | | -export const TweetComp = () => { |
10 | | - return ( |
11 | | - <div className="border border-slate-800 border-spacing-x-0.5"> |
12 | | - <div className="flex p-3 gap-2"> |
13 | | - <div className="mt-1"> |
14 | | - <UserAvatar /> |
15 | | - </div> |
16 | | - <div className=""> |
17 | | - <div className="grid grid-cols-6"> |
18 | | - <div className="flex col-span-5"> |
19 | | - <p>username</p> |
20 | | - <p> @name</p> |
21 | | - <p> . time</p> |
22 | | - </div> |
23 | | - <p className="text-end">...</p> |
24 | | - </div> |
25 | | - <div className="flex flex-col"> |
26 | | - <div className="list-inside"> |
27 | | - #day100 so finally I completed 100 day of code. Amazing journey |
28 | | - amazing learning and amazing people I have got in this journey and |
29 | | - here are some glimpse from the journey. Thank you everyone and |
30 | | - specially @kirat_tw #100xdevs #buildinpublic #space |
31 | | - #LearningJourney #WeekendPlans |
32 | | - </div> |
33 | | - <div className="">Image Part</div> |
34 | | - </div> |
35 | | - {/* <div className="grid grid-cols-5 space-x-8"> |
36 | | - <div className="flex col-span-1"> |
37 | | - <FaRegComment /> |
38 | | - </div> |
39 | | - <div className="flex col-span-1"> |
40 | | - <BiRepost /> |
41 | | - </div> |
42 | | - <div className="flex col-span-1"> |
43 | | - <FiHeart /> |
44 | | - </div> |
45 | | - <div className="flex col-span-1"> |
46 | | - <IoIosStats /> |
47 | | - </div> |
48 | | - <div className="flex"> |
49 | | - <FaRegBookmark /> |
50 | | - <RiShare2Line /> |
51 | | - </div> |
52 | | - </div> */} |
| 7 | +import { UserAvatar } from "./usrAvatar"; |
53 | 8 |
|
54 | | - <div className="flex space-x-24"> |
55 | | - <FaRegComment /> |
56 | | - <BiRepost /> |
57 | | - <FiHeart /> |
58 | | - <IoIosStats /> |
59 | | - {/* <div className=""> |
60 | | - </div> |
61 | | - <div className=""> |
62 | | - </div> |
63 | | - <div className=""> |
| 9 | +interface TweetProps { |
| 10 | + tweet: { |
| 11 | + id: number; |
| 12 | + content: string; |
| 13 | + userID: number; |
| 14 | + likes: number; |
| 15 | + createdDate: string; |
| 16 | + user: { name: string }; |
| 17 | + }; |
| 18 | +} |
| 19 | + |
| 20 | +export const TweetComp = ({ tweet }: TweetProps) => { |
| 21 | + return ( |
| 22 | + <div> |
| 23 | + <div> |
| 24 | + <div className="border border-slate-800 border-spacing-x-0.5"> |
| 25 | + <div className="flex p-3 gap-2"> |
| 26 | + <div className="mt-1"> |
| 27 | + <UserAvatar /> |
64 | 28 | </div> |
65 | 29 | <div className=""> |
66 | | - </div> */} |
67 | | - <div className="flex"> |
68 | | - <FaRegBookmark /> |
69 | | - <RiShare2Line /> |
| 30 | + <div className="grid grid-cols-6"> |
| 31 | + <div className="flex col-span-5"> |
| 32 | + <p>{tweet.user.name}</p> |
| 33 | + {/* <p> @tweet.content</p> */} |
| 34 | + <p> · {new Date(tweet.createdDate).toLocaleDateString()}</p> |
| 35 | + </div> |
| 36 | + <p className="text-end">...</p> |
| 37 | + </div> |
| 38 | + <div className="flex flex-col"> |
| 39 | + <div className="list-inside">{tweet.content}</div> |
| 40 | + <div className="">Image Part</div> |
| 41 | + </div> |
| 42 | + <div className="flex space-x-24 text-slate-600"> |
| 43 | + <FaRegComment /> |
| 44 | + <BiRepost /> |
| 45 | + <FiHeart /> |
| 46 | + {/* <span>{tweet.likes} </span> */} |
| 47 | + <IoIosStats /> |
| 48 | + <div className="flex"> |
| 49 | + <FaRegBookmark /> |
| 50 | + <RiShare2Line /> |
| 51 | + </div> |
| 52 | + </div> |
70 | 53 | </div> |
71 | 54 | </div> |
72 | 55 | </div> |
|
0 commit comments