Skip to content

Commit 40a52ed

Browse files
committed
refresh router when delete site, upgrade next to latest
1 parent 17f46dc commit 40a52ed

File tree

4 files changed

+41
-39
lines changed

4 files changed

+41
-39
lines changed

components/form/delete-site-form.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default function DeleteSiteForm({ siteName }: { siteName: string }) {
1818
deleteSite(data, id, "delete")
1919
.then(async () => {
2020
va.track("Deleted Site");
21+
router.refresh();
2122
router.push("/sites");
2223
toast.success(`Successfully deleted site!`);
2324
})

components/mdx.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ interface ExampleCardProps
3232
}
3333

3434
function Examples({ data }: { data: string }) {
35+
if (!data) return null;
3536
const parsedData = JSON.parse(data) as Array<ExampleCardProps>;
3637
return (
3738
<div className="not-prose my-10 grid grid-cols-1 gap-x-4 gap-y-4 lg:-mx-36 lg:mb-20 lg:grid-cols-3 lg:gap-y-8">

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"js-cookie": "^3.0.1",
4040
"lucide-react": "^0.244.0",
4141
"nanoid": "^4.0.2",
42-
"next": "13.4.8-canary.9",
42+
"next": "13.4.8-canary.13",
4343
"next-auth": "4.22.1",
4444
"next-mdx-remote": "^4.4.1",
4545
"openai-edge": "^1.1.0",

pnpm-lock.yaml

Lines changed: 38 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)