Skip to content

Commit

Permalink
Revert "chore: test CI should fail"
Browse files Browse the repository at this point in the history
This reverts commit 27b6d57.
  • Loading branch information
alicanerdurmaz committed Jan 22, 2024
1 parent 27b6d57 commit 42eda69
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions refine-nextjs/plugins/antd-example/pages/blog-posts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,49 +127,49 @@ export default function BlogPostList() {
);
};

// export const getServerSideProps: GetServerSideProps<{}> = async (context) => {
// <%_ if (_app.isNextAuthCheck) { _%>
// const session = await getServerSession(
// context.req,
// context.res,
// authOptions,
// );
// <%_ } _%>
export const getServerSideProps: GetServerSideProps<{}> = async (context) => {
<%_ if (_app.isNextAuthCheck) { _%>
const session = await getServerSession(
context.req,
context.res,
authOptions,
);
<%_ } _%>

// <%_ if (_app.isAuthProviderCheck) { _%>
// const { authenticated, redirectTo } = await authProvider.check(context);
// <%_ } _%>
<%_ if (_app.isAuthProviderCheck) { _%>
const { authenticated, redirectTo } = await authProvider.check(context);
<%_ } _%>

// <%_ if (_app.isNextAuthCheck) { _%>
// if (!session) {
// return {
// props: {
// },
// redirect: {
// destination: `/login?to=${encodeURIComponent("/blog-posts")}`,
// permanent: false,
// },
// };
// }
// <%_ } _%>
<%_ if (_app.isNextAuthCheck) { _%>
if (!session) {
return {
props: {
},
redirect: {
destination: `/login?to=${encodeURIComponent("/blog-posts")}`,
permanent: false,
},
};
}
<%_ } _%>

// <%_ if (_app.isAuthProviderCheck) { _%>
// if (!authenticated) {
// return {
// props: {
<%_ if (_app.isAuthProviderCheck) { _%>
if (!authenticated) {
return {
props: {

// },
// redirect: {
// destination: `${redirectTo}?to=${encodeURIComponent("/blog-posts")}`,
// permanent: false,
// },
// };
// }
// <%_ } _%>
},
redirect: {
destination: `${redirectTo}?to=${encodeURIComponent("/blog-posts")}`,
permanent: false,
},
};
}
<%_ } _%>

// return {
// props: {
return {
props: {

// },
// };
// };
},
};
};

0 comments on commit 42eda69

Please sign in to comment.