fix: force a cache invalidation using router.refresh

This commit is contained in:
shadcn 2022-11-05 11:11:26 +04:00
parent 22381e5d5f
commit c2da74c662

View file

@ -42,6 +42,9 @@ export function PostCreateButton({
const post = await createPost()
// This forces a cache invalidation.
router.refresh()
router.push(`/editor/${post.id}`)
}