diff --git a/src/app/(main)/editor/[postId]/_components/post-editor.tsx b/src/app/(main)/editor/[postId]/_components/post-editor.tsx index 81205f2..45fe7c3 100644 --- a/src/app/(main)/editor/[postId]/_components/post-editor.tsx +++ b/src/app/(main)/editor/[postId]/_components/post-editor.tsx @@ -25,14 +25,15 @@ import { toast } from "sonner"; const markdownlink = "https://remarkjs.github.io/react-markdown/" // Can also be changed for something like /markdown -interface Props { - post: RouterOutputs["post"]["get"]; -} - type usertype = { id: string; } +interface Props { + post: RouterOutputs["post"]["get"]; + user: usertype; +} + const schema = z.object({ title: z.string().min(3).max(255), excerpt: z.string().min(3).max(255), @@ -42,7 +43,7 @@ const schema = z.object({ .max(2048 * 2), }); -export const PostEditor = ({ post }: Props, user: usertype) => { +export const PostEditor = ({ post, user }: Props) => { if (!post) return null; const formRef = useRef(null); const updatePost = api.post.update.useMutation();