Skip to content

Commit

Permalink
feature: add 404 redirect to home (#129)
Browse files Browse the repository at this point in the history
* 404 page redirects to home

* fix

* dont ssr the 404 page
  • Loading branch information
dsinghvi authored Sep 19, 2023
1 parent 0b2c9db commit 9ead3bb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/ui/fe-bundle/src/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import dynamic from "next/dynamic";
import { useRouter } from "next/router";

const Core: React.FC<void> = () => {
const router = useRouter();

void router.push("/");
return null;
};

const NotFoundPage = dynamic(() => Promise.resolve(Core), {
ssr: false,
});

export default NotFoundPage;

1 comment on commit 9ead3bb

@vercel
Copy link

@vercel vercel bot commented on 9ead3bb Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

fern-dev – ./packages/ui/fe-bundle

fern-dev-buildwithfern.vercel.app
fern-dev-git-main-buildwithfern.vercel.app
app-dev.buildwithfern.com
devtest.buildwithfern.com

Please sign in to comment.