2020-07-26 01:31:07 +02:00
|
|
|
import React from 'react';
|
2020-08-07 11:27:12 +02:00
|
|
|
import Layout from 'components/layout/Layout';
|
|
|
|
import LoginForm from 'components/forms/LoginForm';
|
2020-07-26 01:31:07 +02:00
|
|
|
|
2022-08-02 03:42:07 +02:00
|
|
|
export default function LoginPage({ loginDisabled }) {
|
|
|
|
if (loginDisabled) {
|
2022-02-17 00:01:33 +01:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2020-07-26 01:31:07 +02:00
|
|
|
return (
|
2020-08-12 07:24:41 +02:00
|
|
|
<Layout title="login" header={false} footer={false} center>
|
2020-08-07 11:27:12 +02:00
|
|
|
<LoginForm />
|
2020-07-26 01:31:07 +02:00
|
|
|
</Layout>
|
|
|
|
);
|
|
|
|
}
|
2022-08-02 03:42:07 +02:00
|
|
|
|
|
|
|
export async function getServerSideProps() {
|
|
|
|
return {
|
2022-10-22 06:33:23 +02:00
|
|
|
props: { loginDisabled: !!process.env.DISABLE_LOGIN || !!process.env.isCloudMode },
|
2022-08-02 03:42:07 +02:00
|
|
|
};
|
|
|
|
}
|