11 lines
255 B
TypeScript
11 lines
255 B
TypeScript
import Post from '../components/post';
|
|
import { useLocation } from "react-router";
|
|
|
|
export default function ViewPost() {
|
|
const location = useLocation();
|
|
const statePostId = location.state?.parentId;
|
|
|
|
return (
|
|
<Post postId={statePostId} />
|
|
)
|
|
}
|