-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blog template TS migration #121
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one looks good and works well. One suggestion for typing but otherwise good
|
||
// reformat the content field to be a markdown field | ||
setValue("content", { | ||
markdown: content, | ||
}); | ||
} as any); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of doing this, we should be able to type the default value (line 40 of this file)
content: "Start writing your blog post here!" as string | { markdown: string | (string & { markdown: string | null | undefined; }); },
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll also try to find a big of time to clean this up before we pivot outside of Shopify apps, it is an icky MDXEditor integration right now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that type but it didn't seem to work. Not sure what to do in this case. Do you have an suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try it on line 40? Seems to work okay here:
https://blog-ts-template-test.gadget.app/edit/development/files/web/components/PostForm.tsx?startLineNumber=40&startColumn=0&endLineNumber=40&endColumn=0
No description provided.