import React, {useState} from "react"; function range(start:number, end:number) { return (new Array(end - start + 1)).fill(undefined).map((_, i) => i + start); } export default function BoardPage() { const ords = range(0,4); //[0,1,2,3,4]; const [count, setCount] = useState(0); const fakes = [['Seoul', '2022-06-30', '0'], ['Jeju', '2022-9-10', '1'], ['Busan', '2022-9-22', '2'], ['Daegu', '2022-10-1', '3'], ['Incheon', '2022-12-12','4'],]; return (
`Travel Report's Board`
`여행지 후기를 남겨주세요!`
No.
Title
Date
Clicks
{ords.map((ord, index) => (
{ord + 1}
{/*title */}
{fakes[ord][1]}
{count}
))}
); }