This repository has been archived on 2024-06-14. You can view files and clone it, but cannot push or open issues or pull requests.
icynet-admin/pages/login.tsx

20 lines
349 B
TypeScript
Raw Normal View History

2022-08-29 18:09:28 +00:00
import withUser from '../lib/session';
import { LoginPage } from '../components/LoginPage/LoginPage';
export default LoginPage;
export const getServerSideProps = withUser(async (ctx, user) => {
if (user) {
return {
redirect: {
destination: '/',
permanent: false,
},
};
}
return {
props: {},
};
});