umami/pages/login.js

22 lines
466 B
JavaScript
Raw Normal View History

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
export default function LoginPage({ loginDisabled }) {
if (loginDisabled) {
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>
);
}
export async function getServerSideProps() {
return {
props: { loginDisabled: !!process.env.DISABLE_LOGIN },
};
}