61 lines
1.8 KiB
JavaScript
61 lines
1.8 KiB
JavaScript
|
"use client";
|
||
|
|
||
|
import React, { useRef, useState } from "react";
|
||
|
import Photos from "../Photos";
|
||
|
|
||
|
|
||
|
export default function PostItem({ follow }) {
|
||
|
return (
|
||
|
<div className="flex">
|
||
|
<img
|
||
|
className="flex-none w-8 h-8 rounded-full mr-2"
|
||
|
src="https://picsum.photos/seed/picsum/200/300"
|
||
|
alt=""
|
||
|
/>
|
||
|
<div className="flex-1">
|
||
|
<div className="flex justify-between items-center">
|
||
|
<span className="font-bold text-md">用户名</span>
|
||
|
<span className="rounded-full bg-[#FFFFFF1A] px-2 py-1 text-xs text-white font-medium">
|
||
|
{follow?"已关注":"关注"}
|
||
|
</span>
|
||
|
</div>
|
||
|
<p className="mb-2 mt-3">御姐风细跟高跟鞋太绝了</p>
|
||
|
<ul>
|
||
|
<li>
|
||
|
<Photos
|
||
|
photos={[
|
||
|
"https://picsum.photos/seed/picsum/200/300",
|
||
|
"https://picsum.photos/cat/picsum/200/300",
|
||
|
"https://picsum.photos/seed/picsum/200/300",
|
||
|
"https://picsum.photos/cat/picsum/200/300",
|
||
|
]}
|
||
|
/>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<div className="flex justify-between items-center">
|
||
|
<span className="mr-2">
|
||
|
{"new" < 7
|
||
|
? `空间${
|
||
|
"new" === 0
|
||
|
? "今日"
|
||
|
: "new" === 1
|
||
|
? "昨日"
|
||
|
: "new" === 2
|
||
|
? "前天"
|
||
|
: "new" + "天前"
|
||
|
}有更新`
|
||
|
: "1" === 2
|
||
|
? "空间今日有更新"
|
||
|
: ""}
|
||
|
</span>
|
||
|
<div>
|
||
|
<span className="mr-2 text-xs">点赞</span>
|
||
|
<span className="mr-2">···</span>
|
||
|
</div>
|
||
|
</div>
|
||
|
{/* <div className="rounded-full h-px bg-gray-200 mt-2"></div> */}
|
||
|
</div>
|
||
|
</div>
|
||
|
);
|
||
|
}
|