Skip to content

Commit

Permalink
Fixed typescript issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fr3akyMurk committed Feb 27, 2024
1 parent f34b9ba commit 33fafd9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/app/(main)/editor/[postId]/_components/post-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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<HTMLFormElement>(null);
const updatePost = api.post.update.useMutation();
Expand Down

0 comments on commit 33fafd9

Please sign in to comment.