import React, {useState} from "react"; import Post, { PostType } from "./post"; function range(start:number, end:number) { return (new Array(end - start + 1)).fill(undefined).map((_, i) => i + start); } const fakes = [{id: "a", title:'부산남자의 서울여행', date:'2022-06-30', click: 0},{id: "b", title:'바다!바다!바다!', date:'2022-08-01',click:0}, {id: "c", title:'Jeju-island', date:'2022-9-10',click:0}, {id: "d", title:'마! 부싼 가봤나!', date:'2022-9-22', click:0}, {id: "e", title:'Daegu', date:'2022-10-1', click:0}, {id: "f", title:'강원도 감자는 맛있다.', date:'2022-12-12',click:0},{id: "g", title:'여행가고싶다...',date:'2022-12-25',click:0}]; interface Posts { posts: PostType[]; } export default function BoardPage() { const [posts, setPosts] = useState(fakes); return (
`Travel Report's Board`
`여행지 후기를 남겨주세요!`
{/* Link */}
Title
Date
Clicks
{posts.map((post) => ( ))}
); }