i fuck up

This commit is contained in:
renzynx 2022-12-20 09:29:40 +07:00
parent 342fc871eb
commit 7066281e6f
2 changed files with 0 additions and 14 deletions

View File

@ -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')}

View File

@ -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')}