dashboard-v2: move static elements of auth pages to AuthLayout
This commit is contained in:
parent
9cfea2266a
commit
d093577909
|
@ -82,7 +82,7 @@ export const LoginForm = ({ onSuccess }) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p className="text-sm text-center mt-8">
|
<p className="text-sm text-center mt-8">
|
||||||
Don't have an account? <HighlightedLink to="/auth/signup">Sign up</HighlightedLink>
|
Don't have an account? <HighlightedLink to="/auth/registration">Sign up</HighlightedLink>
|
||||||
</p>
|
</p>
|
||||||
</Form>
|
</Form>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -33,7 +33,14 @@ const AuthLayout =
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</SloganContainer>
|
</SloganContainer>
|
||||||
<Content>{children}</Content>
|
<Content>
|
||||||
|
<div className="bg-white px-8 py-10 md:py-32 lg:px-16 xl:px-28 min-h-screen">
|
||||||
|
<div className="mb-4 md:mb-16">
|
||||||
|
<img src="/images/logo-black-text.svg" alt="Skynet" className="-ml-2" />
|
||||||
|
</div>
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
</Content>
|
||||||
</Layout>
|
</Layout>
|
||||||
</UserProvider>
|
</UserProvider>
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -22,16 +22,11 @@ const LoginPage = ({ location }) => {
|
||||||
<Metadata>
|
<Metadata>
|
||||||
<title>Sign In</title>
|
<title>Sign In</title>
|
||||||
</Metadata>
|
</Metadata>
|
||||||
<div className="bg-white px-8 py-10 md:py-32 lg:px-16 xl:px-28 min-h-screen">
|
|
||||||
<div className="mb-4 md:mb-16">
|
|
||||||
<img src="/images/logo-black-text.svg" alt="Skynet" />
|
|
||||||
</div>
|
|
||||||
<LoginForm
|
<LoginForm
|
||||||
onSuccess={async () => {
|
onSuccess={async () => {
|
||||||
await refreshUserState();
|
await refreshUserState();
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -61,11 +61,7 @@ const SignUpPage = () => {
|
||||||
<Metadata>
|
<Metadata>
|
||||||
<title>Sign Up</title>
|
<title>Sign Up</title>
|
||||||
</Metadata>
|
</Metadata>
|
||||||
<div className="bg-white px-8 py-10 md:py-32 lg:px-16 xl:px-28 min-h-screen">
|
<div className="flex flex-col">
|
||||||
<div className="mb-4 md:mb-16">
|
|
||||||
<img src="/images/logo-black-text.svg" alt="Skynet" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{!settings.areAccountsEnabled && <Alert $variant="info">Accounts are not enabled on this portal.</Alert>}
|
{!settings.areAccountsEnabled && <Alert $variant="info">Accounts are not enabled on this portal.</Alert>}
|
||||||
|
|
||||||
{settings.areAccountsEnabled && (
|
{settings.areAccountsEnabled && (
|
||||||
|
|
|
@ -20,10 +20,6 @@ const ResetPasswordPage = () => {
|
||||||
<Metadata>
|
<Metadata>
|
||||||
<title>Reset Password</title>
|
<title>Reset Password</title>
|
||||||
</Metadata>
|
</Metadata>
|
||||||
<div className="bg-white px-8 py-10 md:py-32 lg:px-16 xl:px-28 min-h-screen">
|
|
||||||
<div className="mb-4 md:mb-16">
|
|
||||||
<img src="/images/logo-black-text.svg" alt="Skynet" />
|
|
||||||
</div>
|
|
||||||
{state !== State.Success && (
|
{state !== State.Success && (
|
||||||
<RecoveryForm onSuccess={() => setState(State.Success)} onFailure={() => setState(State.Failure)} />
|
<RecoveryForm onSuccess={() => setState(State.Success)} onFailure={() => setState(State.Failure)} />
|
||||||
)}
|
)}
|
||||||
|
@ -41,10 +37,9 @@ const ResetPasswordPage = () => {
|
||||||
Suddenly remembered your password? <HighlightedLink to="/auth/login">Sign in</HighlightedLink>
|
Suddenly remembered your password? <HighlightedLink to="/auth/login">Sign in</HighlightedLink>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Don't actually have an account? <HighlightedLink to="/auth/signup">Create one!</HighlightedLink>
|
Don't actually have an account? <HighlightedLink to="/auth/registration">Create one!</HighlightedLink>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -57,10 +57,6 @@ const EmailConfirmationPage = ({ location }) => {
|
||||||
<Metadata>
|
<Metadata>
|
||||||
<title>Confirm E-mail Address</title>
|
<title>Confirm E-mail Address</title>
|
||||||
</Metadata>
|
</Metadata>
|
||||||
<div className="bg-white px-8 py-10 md:py-32 lg:px-16 xl:px-28 min-h-screen">
|
|
||||||
<div className="mb-4 md:mb-16">
|
|
||||||
<img src="/images/logo-black-text.svg" alt="Skynet" />
|
|
||||||
</div>
|
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
{state === State.Pure && <p>Please wait while we verify your account...</p>}
|
{state === State.Pure && <p>Please wait while we verify your account...</p>}
|
||||||
|
|
||||||
|
@ -74,7 +70,6 @@ const EmailConfirmationPage = ({ location }) => {
|
||||||
|
|
||||||
{state === State.Failure && <p className="text-error">Something went wrong, please try again later.</p>}
|
{state === State.Failure && <p className="text-error">Something went wrong, please try again later.</p>}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,10 +24,6 @@ const RecoverPage = ({ location }) => {
|
||||||
<Metadata>
|
<Metadata>
|
||||||
<title>Recover Your Account</title>
|
<title>Recover Your Account</title>
|
||||||
</Metadata>
|
</Metadata>
|
||||||
<div className="bg-white px-8 py-10 md:py-32 lg:px-16 xl:px-28 min-h-screen">
|
|
||||||
<div className="mb-4 md:mb-16">
|
|
||||||
<img src="/images/logo-black-text.svg" alt="Skynet" />
|
|
||||||
</div>
|
|
||||||
{state !== State.Success && (
|
{state !== State.Success && (
|
||||||
<ResetPasswordForm
|
<ResetPasswordForm
|
||||||
token={token}
|
token={token}
|
||||||
|
@ -52,7 +48,6 @@ const RecoverPage = ({ location }) => {
|
||||||
<p className="text-sm text-center mt-8">
|
<p className="text-sm text-center mt-8">
|
||||||
Suddenly remembered your old password? <HighlightedLink to="/auth/login">Sign in</HighlightedLink>
|
Suddenly remembered your old password? <HighlightedLink to="/auth/login">Sign in</HighlightedLink>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Reference in New Issue