feat: replace login button with a dedicated login form component
This commit is contained in:
parent
6e55bb1857
commit
aeff20589b
3 changed files with 26 additions and 27 deletions
|
@ -1,8 +1,7 @@
|
||||||
// /home/max/Git/MeetUp/src/app/login/page.tsx
|
// /home/max/Git/MeetUp/src/app/login/page.tsx
|
||||||
import { auth } from '@/auth';
|
import { auth } from '@/auth';
|
||||||
import LabeledInput from '@/components/labeled-input';
|
|
||||||
import SSOLogin from '@/components/user/sso-login-button';
|
import SSOLogin from '@/components/user/sso-login-button';
|
||||||
import Login from '@/components/user/login-button';
|
import LoginForm from '@/components/user/login-form';
|
||||||
import { redirect } from 'next/navigation';
|
import { redirect } from 'next/navigation';
|
||||||
|
|
||||||
import style from './login.module.css';
|
import style from './login.module.css';
|
||||||
|
@ -20,20 +19,7 @@ export default async function LoginPage() {
|
||||||
<div className={style.loginContainer}>
|
<div className={style.loginContainer}>
|
||||||
<h1>Login</h1>
|
<h1>Login</h1>
|
||||||
|
|
||||||
<form>
|
<LoginForm></LoginForm>
|
||||||
<LabeledInput
|
|
||||||
type='email'
|
|
||||||
label='E-Mail'
|
|
||||||
placeholder='Enter your E-Mail'
|
|
||||||
/>
|
|
||||||
<LabeledInput
|
|
||||||
type='password'
|
|
||||||
label='Password'
|
|
||||||
placeholder='Enter your Password'
|
|
||||||
/>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<Login></Login>
|
|
||||||
|
|
||||||
<hr style={{ width: 230 }} />
|
<hr style={{ width: 230 }} />
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
import Button from '../button';
|
|
||||||
|
|
||||||
export default function Login() {
|
|
||||||
return (
|
|
||||||
<form>
|
|
||||||
<Button type='submit' mode='neutral' width={250}>
|
|
||||||
Login
|
|
||||||
</Button>
|
|
||||||
</form>
|
|
||||||
);
|
|
||||||
}
|
|
24
src/components/user/login-form.tsx
Normal file
24
src/components/user/login-form.tsx
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
import LabeledInput from '@/components/labeled-input';
|
||||||
|
import Button from '../button';
|
||||||
|
|
||||||
|
export default function LoginForm() {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<form>
|
||||||
|
<LabeledInput
|
||||||
|
type='email'
|
||||||
|
label='E-Mail'
|
||||||
|
placeholder='Enter your E-Mail'
|
||||||
|
/>
|
||||||
|
<LabeledInput
|
||||||
|
type='password'
|
||||||
|
label='Password'
|
||||||
|
placeholder='Enter your Password'
|
||||||
|
/>
|
||||||
|
<Button type='submit' mode='neutral' width={250}>
|
||||||
|
Login
|
||||||
|
</Button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue