mirror of https://github.com/renzynx/bliss.git
i fuck up
This commit is contained in:
parent
342fc871eb
commit
7066281e6f
|
@ -11,17 +11,11 @@ import {
|
|||
Text,
|
||||
TextInput,
|
||||
} from '@mantine/core';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { signInStyles } from './styles';
|
||||
|
||||
const SignInForm = ({ props, callback }: SignInFormProps) => {
|
||||
const { classes } = signInStyles();
|
||||
const { login, loading, form } = useLogin({ callback });
|
||||
const ref = useRef<HTMLInputElement>();
|
||||
|
||||
useEffect(() => {
|
||||
ref.current?.focus();
|
||||
});
|
||||
|
||||
return (
|
||||
<Paper className={classes.container} {...props}>
|
||||
|
@ -36,7 +30,6 @@ const SignInForm = ({ props, callback }: SignInFormProps) => {
|
|||
id="username_email"
|
||||
name="username_email"
|
||||
label="Username or Email"
|
||||
ref={ref}
|
||||
/>
|
||||
<PasswordInput
|
||||
{...form.getInputProps('password')}
|
||||
|
|
|
@ -17,15 +17,9 @@ import {
|
|||
} from '@mantine/core';
|
||||
import { IconArrowBack, IconUser } from '@tabler/icons';
|
||||
import router from 'next/router';
|
||||
import { useEffect, useRef } from 'react';
|
||||
|
||||
function SignUpPage({ settings }: { settings: ServerSettings }) {
|
||||
const { form, loading, register } = useRegister();
|
||||
const ref = useRef<HTMLInputElement>();
|
||||
|
||||
useEffect(() => {
|
||||
ref.current?.focus();
|
||||
}, []);
|
||||
|
||||
if (!settings) {
|
||||
return <LoadingPage />;
|
||||
|
@ -96,7 +90,6 @@ function SignUpPage({ settings }: { settings: ServerSettings }) {
|
|||
id="username"
|
||||
label="Username"
|
||||
description="Leave empty to get a random username"
|
||||
ref={ref}
|
||||
/>
|
||||
<TextInput
|
||||
{...form.getInputProps('email')}
|
||||
|
|
Loading…
Reference in New Issue