Skip to content

Commit fd4386f

Browse files
fix: fixed linting errors
1 parent 7b2a049 commit fd4386f

File tree

3 files changed

+21
-24
lines changed

3 files changed

+21
-24
lines changed

frontend/src/components/commonUI/GoogleAuthButton.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import GoogleIcon from '@/assets/google-icon.svg'
12
import { Button, type ButtonProps, HStack, Image, Text } from '@chakra-ui/react'
23
import { forwardRef } from 'react'
3-
import GoogleIcon from '@/assets/google-icon.svg'
44

55
interface GoogleAuthButtonProps extends ButtonProps {
66
action: 'login' | 'signup'
@@ -26,12 +26,10 @@ export const GoogleAuthButton = forwardRef<HTMLButtonElement, GoogleAuthButtonPr
2626
>
2727
<HStack spacing={2} width="100%" justifyContent="center">
2828
<Image src={GoogleIcon} alt="Google" boxSize="18px" />
29-
<Text>
30-
{action === 'login' ? 'Continue with Google' : 'Sign up with Google'}
31-
</Text>
29+
<Text>{action === 'login' ? 'Continue with Google' : 'Sign up with Google'}</Text>
3230
</HStack>
3331
</Button>
34-
)
32+
),
3533
)
3634

37-
GoogleAuthButton.displayName = 'GoogleAuthButton'
35+
GoogleAuthButton.displayName = 'GoogleAuthButton'

frontend/src/routes/_publicLayout/login.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
import Logo from '@/assets/Logo.svg'
22
import useAuth from '@/hooks/useAuth'
3-
import {
4-
Container,
5-
Field,
6-
Fieldset,
7-
HStack,
8-
Image,
9-
Text,
10-
VStack,
11-
Box,
12-
} from '@chakra-ui/react'
3+
import { Box, Container, Field, Fieldset, HStack, Image, Text, VStack } from '@chakra-ui/react'
134
import { Link, createFileRoute, redirect } from '@tanstack/react-router'
145
import { type SubmitHandler, useForm } from 'react-hook-form'
156
import { useTranslation } from 'react-i18next'
@@ -132,8 +123,6 @@ function Login() {
132123
</HStack>
133124

134125
<GoogleAuthButton action="login" onClick={handleGoogleLogin} />
135-
136-
137126
</VStack>
138127
<Box pl={0} ml={0}>
139128
<Text textAlign="left" pl={0} ml={0}>

frontend/src/routes/_publicLayout/signup.tsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
import Logo from '@/assets/Logo.svg'
22
import useAuth from '@/hooks/useAuth'
3-
import { Button, Container, Field, Fieldset, HStack, Image, Text, VStack, Box } from '@chakra-ui/react'
3+
import {
4+
Box,
5+
Button,
6+
Container,
7+
Field,
8+
Fieldset,
9+
HStack,
10+
Image,
11+
Text,
12+
VStack,
13+
} from '@chakra-ui/react'
414
import { Link, createFileRoute, redirect } from '@tanstack/react-router'
515
import { type SubmitHandler, useForm } from 'react-hook-form'
616
import { useTranslation } from 'react-i18next'
717
import type { UserRegister } from '../../client'
8-
import { DefaultInput } from '../../components/commonUI/Input'
918
import { GoogleAuthButton } from '../../components/commonUI/GoogleAuthButton'
19+
import { DefaultInput } from '../../components/commonUI/Input'
1020
import PasswordInput from '../../components/commonUI/PasswordInput'
1121
import { confirmPasswordRules, emailPattern, passwordRules } from '../../utils'
1222

@@ -68,7 +78,7 @@ function SignUp() {
6878
centerContent
6979
>
7080
<Image src={Logo} alt="Logo" height="auto" maxW="2xs" alignSelf="center" mb={4} />
71-
81+
7282
<VStack spacing={4} width="100%">
7383
<form onSubmit={handleSubmit(onSubmit)} style={{ width: '100%' }}>
7484
<Fieldset.Root maxW="sm">
@@ -126,18 +136,18 @@ function SignUp() {
126136
</Button>
127137
</Fieldset.Root>
128138
</form>
129-
139+
130140
<HStack width="100%" my={2}>
131141
<Box flex="1" height="1px" bg="bg.200" />
132142
<Text fontSize="sm" color="fg.muted" px={2}>
133143
{t('general.words.or')}
134144
</Text>
135145
<Box flex="1" height="1px" bg="bg.200" />
136146
</HStack>
137-
147+
138148
<GoogleAuthButton action="signup" onClick={handleGoogleSignup} />
139149
</VStack>
140-
150+
141151
<Box>
142152
<Text>
143153
{t('routes.publicLayout.signUp.alreadyHaveAccount')}{' '}

0 commit comments

Comments
 (0)