import React, { useState } from "react"; import { useLocation, useParams } from "react-router-dom"; interface PostState { state: { title: string; text: string; theme: string; city: string; date: string; counts: number; _id: string; user: string; }; } export function IntoPost() { const location = useLocation() as PostState; const post = location.state; // console.log(post); return (