Skip to content

Commit

Permalink
fix: Revalidate root path after creating a post
Browse files Browse the repository at this point in the history
  • Loading branch information
ahsanzizan committed Jul 10, 2024
1 parent 8dfa8be commit e852c47
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/actions/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export async function postCreate(

revalidatePath("/berita");
revalidatePath("/admin/posts");
revalidatePath("/");

return { message: "Success", result: { id: newPost.id } };
} catch (e) {
Expand Down

0 comments on commit e852c47

Please sign in to comment.