import React from "react"; import { useLocation } from "react-router-dom"; import { PostType } from "../types"; interface PostState { state: PostType; } export function IntoPost() { const location = useLocation() as PostState; const post = location.state; // console.log(post); return (
제목: {post.title}
작성자: nickname
도시: {post.city}
테마: {post.theme}
작성일: {post.date}
조회수: {post.counts}
{post.text}
); }