)}
);
-};
-
+}
export async function getServerSideProps(context) {
const { req } = context;
const token = req.cookies["token"];
- if (!await isAuthenticated(token)) {
+ if (!(await isAuthenticated(token))) {
// If the user is not authenticated, redirect them to the login page
return {
redirect: {