Skip to content

Commit

Permalink
chore: show notifications in a separate page
Browse files Browse the repository at this point in the history
  • Loading branch information
ayush-classiebit committed Jun 6, 2023
1 parent 44bf60b commit 20b37bd
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions pages/notifications.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { NextPageContext } from "next";

import Header from "@/components/Header";
import NotificationsFeed from "@/components/NotificationsFeed";
import { getSession } from "next-auth/react";

export async function getServerSideProps(context: NextPageContext) {
const session = await getSession(context);
if (!session) {
return {
redirect: {
destination: "/",
permanent: false,
},
};
}

return {
props: {
session,
},
};
}

const Notifications = () => {
return (
<>
<Header label="Notifications" showBackArrow />
<NotificationsFeed />
</>
);
};

export default Notifications;

0 comments on commit 20b37bd

Please sign in to comment.