Skip to content

Commit 70f2224

Browse files
committed
🎨 Format
1 parent 980cf72 commit 70f2224

8 files changed

Lines changed: 41 additions & 43 deletions

File tree

frontend/src/lib/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { clsx, type ClassValue } from "clsx"
1+
import { type ClassValue, clsx } from "clsx"
22
import { twMerge } from "tailwind-merge"
33

44
export function cn(...inputs: ClassValue[]) {

frontend/src/routes/__root.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { ReactQueryDevtools } from "@tanstack/react-query-devtools"
22
import { createRootRoute, Outlet } from "@tanstack/react-router"
33
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools"
4-
5-
import NotFound from "@/components/Common/NotFound"
64
import ErrorComponent from "@/components/Common/ErrorComponent"
5+
import NotFound from "@/components/Common/NotFound"
76

87
export const Route = createRootRoute({
98
component: () => (
@@ -14,5 +13,5 @@ export const Route = createRootRoute({
1413
</>
1514
),
1615
notFoundComponent: () => <NotFound />,
17-
errorComponent: () => <ErrorComponent/>,
16+
errorComponent: () => <ErrorComponent />,
1817
})

frontend/src/routes/login.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { zodResolver } from "@hookform/resolvers/zod"
22
import {
33
createFileRoute,
4-
redirect,
54
Link as RouterLink,
5+
redirect,
66
} from "@tanstack/react-router"
77
import { useForm } from "react-hook-form"
88
import { z } from "zod"
@@ -112,10 +112,7 @@ function Login() {
112112
)}
113113
/>
114114

115-
<LoadingButton
116-
type="submit"
117-
loading={loginMutation.isPending}
118-
>
115+
<LoadingButton type="submit" loading={loginMutation.isPending}>
119116
Log In
120117
</LoadingButton>
121118
</div>

frontend/src/routes/recover-password.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
import { zodResolver } from "@hookform/resolvers/zod"
22
import { useMutation } from "@tanstack/react-query"
3-
import { createFileRoute, Link as RouterLink, redirect } from "@tanstack/react-router"
3+
import {
4+
createFileRoute,
5+
Link as RouterLink,
6+
redirect,
7+
} from "@tanstack/react-router"
48
import { useForm } from "react-hook-form"
59
import { z } from "zod"
610

711
import { LoginService } from "@/client"
8-
import { isLoggedIn } from "@/hooks/useAuth"
9-
import useCustomToast from "@/hooks/useCustomToast"
10-
import { handleError } from "@/utils"
1112
import { AuthLayout } from "@/components/Common/AuthLayout"
12-
import { LoadingButton } from "@/components/ui/loading-button"
13-
import { Input } from "@/components/ui/input"
1413
import {
1514
Form,
1615
FormControl,
@@ -19,6 +18,11 @@ import {
1918
FormLabel,
2019
FormMessage,
2120
} from "@/components/ui/form"
21+
import { Input } from "@/components/ui/input"
22+
import { LoadingButton } from "@/components/ui/loading-button"
23+
import { isLoggedIn } from "@/hooks/useAuth"
24+
import useCustomToast from "@/hooks/useCustomToast"
25+
import { handleError } from "@/utils"
2226

2327
const formSchema = z.object({
2428
email: z.email(),

frontend/src/routes/reset-password.tsx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import { zodResolver } from "@hookform/resolvers/zod"
22
import { useMutation } from "@tanstack/react-query"
3-
import { createFileRoute, Link as RouterLink, redirect, useNavigate } from "@tanstack/react-router"
3+
import {
4+
createFileRoute,
5+
Link as RouterLink,
6+
redirect,
7+
useNavigate,
8+
} from "@tanstack/react-router"
49
import { useForm } from "react-hook-form"
510
import { z } from "zod"
611

712
import { LoginService } from "@/client"
8-
import { isLoggedIn } from "@/hooks/useAuth"
9-
import useCustomToast from "@/hooks/useCustomToast"
10-
import { handleError } from "@/utils"
1113
import { AuthLayout } from "@/components/Common/AuthLayout"
12-
import { LoadingButton } from "@/components/ui/loading-button"
13-
import { PasswordInput } from "@/components/ui/password-input"
1414
import {
1515
Form,
1616
FormControl,
@@ -19,6 +19,11 @@ import {
1919
FormLabel,
2020
FormMessage,
2121
} from "@/components/ui/form"
22+
import { LoadingButton } from "@/components/ui/loading-button"
23+
import { PasswordInput } from "@/components/ui/password-input"
24+
import { isLoggedIn } from "@/hooks/useAuth"
25+
import useCustomToast from "@/hooks/useCustomToast"
26+
import { handleError } from "@/utils"
2227

2328
const searchSchema = z.object({
2429
token: z.string().catch(""),
@@ -30,7 +35,9 @@ const formSchema = z
3035
.string()
3136
.min(1, { message: "Password is required" })
3237
.min(8, { message: "Password must be at least 8 characters" }),
33-
confirm_password: z.string().min(1, { message: "Password confirmation is required" }),
38+
confirm_password: z
39+
.string()
40+
.min(1, { message: "Password confirmation is required" }),
3441
})
3542
.refine((data) => data.new_password === data.confirm_password, {
3643
message: "The passwords don't match",

frontend/src/routes/signup.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ import {
66
} from "@tanstack/react-router"
77
import { useForm } from "react-hook-form"
88
import { z } from "zod"
9-
10-
import useAuth, { isLoggedIn } from "@/hooks/useAuth"
119
import { AuthLayout } from "@/components/Common/AuthLayout"
12-
import { LoadingButton } from "@/components/ui/loading-button"
13-
import { Input } from "@/components/ui/input"
14-
import { PasswordInput } from "@/components/ui/password-input"
1510
import {
1611
Form,
1712
FormControl,
@@ -20,6 +15,10 @@ import {
2015
FormLabel,
2116
FormMessage,
2217
} from "@/components/ui/form"
18+
import { Input } from "@/components/ui/input"
19+
import { LoadingButton } from "@/components/ui/loading-button"
20+
import { PasswordInput } from "@/components/ui/password-input"
21+
import useAuth, { isLoggedIn } from "@/hooks/useAuth"
2322

2423
const formSchema = z
2524
.object({
@@ -29,7 +28,9 @@ const formSchema = z
2928
.string()
3029
.min(1, { message: "Password is required" })
3130
.min(8, { message: "Password must be at least 8 characters" }),
32-
confirm_password: z.string().min(1, { message: "Password confirmation is required" }),
31+
confirm_password: z
32+
.string()
33+
.min(1, { message: "Password confirmation is required" }),
3334
})
3435
.refine((data) => data.password === data.confirm_password, {
3536
message: "The passwords don't match",

frontend/tsconfig.json

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
"compilerOptions": {
33
"target": "ES2020",
44
"useDefineForClassFields": true,
5-
"lib": [
6-
"ES2020",
7-
"DOM",
8-
"DOM.Iterable"
9-
],
5+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
106
"module": "ESNext",
117
"skipLibCheck": true,
128
/* Bundler mode */
@@ -23,19 +19,13 @@
2319
"noFallthroughCasesInSwitch": true,
2420
"baseUrl": ".",
2521
"paths": {
26-
"@/*": [
27-
"./src/*"
28-
]
22+
"@/*": ["./src/*"]
2923
}
3024
},
31-
"include": [
32-
"src",
33-
"tests",
34-
"playwright.config.ts"
35-
],
25+
"include": ["src", "tests", "playwright.config.ts"],
3626
"references": [
3727
{
3828
"path": "./tsconfig.node.json"
3929
}
4030
]
41-
}
31+
}

frontend/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import path from "node:path"
2+
import tailwindcss from "@tailwindcss/vite"
23
import { tanstackRouter } from "@tanstack/router-plugin/vite"
34
import react from "@vitejs/plugin-react-swc"
45
import { defineConfig } from "vite"
5-
import tailwindcss from "@tailwindcss/vite"
66

77
// https://vitejs.dev/config/
88
export default defineConfig({

0 commit comments

Comments
 (0)