2024-06-25 20:18:37 +08:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
import React, { useRef, useState } from "react";
|
|
|
|
import Photos from "../Photos";
|
2024-06-26 19:46:31 +08:00
|
|
|
import { useRouter } from "next/navigation";
|
2024-06-25 20:18:37 +08:00
|
|
|
|
|
|
|
export default function PostItem({ follow }) {
|
2024-06-26 19:46:31 +08:00
|
|
|
const router = useRouter();
|
2024-06-25 20:18:37 +08:00
|
|
|
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=""
|
2024-06-26 19:46:31 +08:00
|
|
|
onClick={()=>router.push("/space/person_space")}
|
2024-06-25 20:18:37 +08:00
|
|
|
/>
|
|
|
|
<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>
|
2024-06-26 19:46:31 +08:00
|
|
|
<p className="mb-2 mt-2">御姐风细跟高跟鞋太绝了</p>
|
2024-06-25 20:18:37 +08:00
|
|
|
<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>
|
|
|
|
);
|
|
|
|
}
|