Skip to content

Commit 2cc68ed

Browse files
committed
Format all current files with prettier (no functionality change)
1 parent a79fa61 commit 2cc68ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+321
-326
lines changed

.map.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/** Auto-generated **/
2-
declare const map: Record<string, unknown>
2+
declare const map: Record<string, unknown>;
33

4-
export { map }
4+
export { map };

components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
"components": "@/components",
1515
"utils": "@/lib/utils"
1616
}
17-
}
17+
}

next.config.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
/** @type {import('next').NextConfig} */
42
const nextConfig = {
53
reactStrictMode: true,
@@ -21,4 +19,4 @@ const nextConfig = {
2119
},
2220
};
2321

24-
export default nextConfig;
22+
export default nextConfig;

src/app/(auth)/reset-password/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const changePasswordAction = unauthenticatedAction
1111
z.object({
1212
token: z.string(),
1313
password: z.string().min(8),
14-
})
14+
}),
1515
)
1616
.handler(async ({ input: { token, password } }) => {
1717
await rateLimitByIp({ key: "change-password", limit: 2, window: 30000 });

src/app/(auth)/reset-password/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default function ResetPasswordPage({
5959
}
6060

6161
return (
62-
<div className="py-24 max-w-[400px] space-y-6 mx-auto">
62+
<div className="mx-auto max-w-[400px] space-y-6 py-24">
6363
{isSuccess && (
6464
<>
6565
<h1 className={cn(pageTitleStyles, "text-center")}>

src/app/(auth)/sign-in/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const signInMagicLinkAction = unauthenticatedAction
1111
.input(
1212
z.object({
1313
email: z.string().email(),
14-
})
14+
}),
1515
)
1616
.handler(async ({ input }) => {
1717
await rateLimitByKey({ key: input.email, limit: 1, window: 30000 });

src/app/(auth)/sign-in/email/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const signInAction = unauthenticatedAction
1414
z.object({
1515
email: z.string().email(),
1616
password: z.string().min(8),
17-
})
17+
}),
1818
)
1919
.handler(async ({ input }) => {
2020
await rateLimitByKey({ key: input.email, limit: 3, window: 10000 });

src/app/(auth)/sign-in/email/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default function SignInPage() {
6161
}
6262

6363
return (
64-
<div className="py-24 mx-auto max-w-[400px] space-y-6">
64+
<div className="mx-auto max-w-[400px] space-y-6 py-24">
6565
<h1 className={cn(pageTitleStyles, "text-center")}>Sign In</h1>
6666

6767
<Form {...form}>

src/app/(auth)/sign-in/forgot-password/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const resetPasswordAction = unauthenticatedAction
1010
.input(
1111
z.object({
1212
email: z.string().email(),
13-
})
13+
}),
1414
)
1515
.handler(async ({ input }) => {
1616
await rateLimitByKey({ key: input.email, limit: 1, window: 30000 });

src/app/(auth)/sign-in/forgot-password/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default function ForgotPasswordPage() {
3939
variant: "destructive",
4040
});
4141
},
42-
}
42+
},
4343
);
4444

4545
const form = useForm<z.infer<typeof registrationSchema>>({
@@ -54,7 +54,7 @@ export default function ForgotPasswordPage() {
5454
}
5555

5656
return (
57-
<div className="py-24 mx-auto max-w-[400px] space-y-6">
57+
<div className="mx-auto max-w-[400px] space-y-6 py-24">
5858
<h1 className={cn(pageTitleStyles, "text-center")}>Forgot Password</h1>
5959

6060
{isSuccess && (

src/app/(auth)/sign-in/magic/error/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Link from "next/link";
44

55
export default function MagicLinkPage() {
66
return (
7-
<div className="py-24 mx-auto max-w-[400px] space-y-6">
7+
<div className="mx-auto max-w-[400px] space-y-6 py-24">
88
<h1 className={pageTitleStyles}>Expired Token</h1>
99
<p className="text-xl">
1010
Sorry, this token was either expired or already used. Please try logging

src/app/(auth)/sign-in/magic/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { pageTitleStyles } from "@/styles/common";
22

33
export default function MagicLinkPage() {
44
return (
5-
<div className="py-24 mx-auto max-w-[400px] space-y-6">
5+
<div className="mx-auto max-w-[400px] space-y-6 py-24">
66
<h1 className={pageTitleStyles}>Check your email</h1>
77
<p className="text-xl">
88
We sent you a magic link to sign in. Click the link in your email to

src/app/(auth)/sign-in/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { MagicLinkForm } from "./magic-link-form";
1010

1111
export default function SignInPage() {
1212
return (
13-
<div className="py-24 flex min-h-[80dvh] items-center justify-center mx-auto">
13+
<div className="mx-auto flex min-h-[80dvh] items-center justify-center py-24">
1414
<div className="mx-auto max-w-md space-y-6">
1515
<div className="space-y-2 text-center">
1616
<h1 className="text-3xl font-bold">Sign In</h1>
@@ -25,10 +25,10 @@ export default function SignInPage() {
2525
buttonVariants({
2626
variant: "secondary",
2727
}),
28-
"w-full"
28+
"w-full",
2929
)}
3030
>
31-
<GoogleIcon className="stroke-white mr-2 h-5 w-5" />
31+
<GoogleIcon className="mr-2 h-5 w-5 stroke-white" />
3232
Sign in with Google
3333
</Link>
3434
<Link
@@ -37,7 +37,7 @@ export default function SignInPage() {
3737
buttonVariants({
3838
variant: "secondary",
3939
}),
40-
"w-full"
40+
"w-full",
4141
)}
4242
>
4343
<GithubIcon className="mr-2 h-5 w-5" />

src/app/(auth)/sign-up/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const signUpAction = unauthenticatedAction
1414
z.object({
1515
email: z.string().email(),
1616
password: z.string().min(8),
17-
})
17+
}),
1818
)
1919
.handler(async ({ input }) => {
2020
await rateLimitByIp({ key: "register", limit: 3, window: 30000 });

src/app/(auth)/sign-up/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default function RegisterPage() {
6060
}
6161

6262
return (
63-
<div className="py-24 mx-auto max-w-[400px] space-y-6">
63+
<div className="mx-auto max-w-[400px] space-y-6 py-24">
6464
<h1 className={cn(pageTitleStyles, "text-center")}>Sign Up</h1>
6565

6666
<Form {...form}>

src/app/_header/header.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ export async function Header() {
2424

2525
return (
2626
<div className="border-b py-4">
27-
<div className="container mx-auto flex justify-between items-center">
28-
<div className="flex gap-8 items-center">
29-
<Link href="/" className="flex gap-2 items-center text-xl">
27+
<div className="container mx-auto flex items-center justify-between">
28+
<div className="flex items-center gap-8">
29+
<Link href="/" className="flex items-center gap-2 text-xl">
3030
<Lightbulb />
3131
<div className="hidden md:block">APP</div>
3232
</Link>
@@ -39,7 +39,7 @@ export async function Header() {
3939
className="flex items-center justify-center gap-2"
4040
>
4141
<Link href={"/dashboard"}>
42-
<LayoutDashboard className="w-4 h-4" /> Dashboard
42+
<LayoutDashboard className="h-4 w-4" /> Dashboard
4343
</Link>
4444
</Button>
4545
)}
@@ -49,8 +49,8 @@ export async function Header() {
4949
<div className="flex items-center justify-between gap-5">
5050
<Suspense
5151
fallback={
52-
<div className="flex items-center justify-center w-40">
53-
<Loader2Icon className="animate-spin w-4 h-4" />
52+
<div className="flex w-40 items-center justify-center">
53+
<Loader2Icon className="h-4 w-4 animate-spin" />
5454
</div>
5555
}
5656
>
@@ -110,7 +110,7 @@ async function ProfileDropdown({ userId }: { userId: UserId }) {
110110
<DropdownMenuTrigger>
111111
<Suspense
112112
fallback={
113-
<div className="bg-gray-800 rounded-full h-10 w-10 shrink-0 flex items-center justify-center">
113+
<div className="flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-gray-800">
114114
..
115115
</div>
116116
}
@@ -124,7 +124,7 @@ async function ProfileDropdown({ userId }: { userId: UserId }) {
124124
<DropdownMenuSeparator />
125125
<DropdownMenuItem asChild className="cursor-pointer">
126126
<Link className="flex items-center" href={"/api/sign-out"}>
127-
<LogOut className="w-4 h-4 mr-2" />
127+
<LogOut className="mr-2 h-4 w-4" />
128128
Sign Out
129129
</Link>
130130
</DropdownMenuItem>

src/app/_header/menu-button.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@ export function MenuButton() {
1919
<DropdownMenuItem asChild>
2020
<Link
2121
href="/dashboard"
22-
className="flex gap-2 items-center cursor-pointer"
22+
className="flex cursor-pointer items-center gap-2"
2323
>
24-
<UsersIcon className="w-4 h-4" /> Your Groups
24+
<UsersIcon className="h-4 w-4" /> Your Groups
2525
</Link>
2626
</DropdownMenuItem>
2727
<DropdownMenuItem asChild>
2828
<Link
2929
href="/browse"
30-
className="flex gap-2 items-center cursor-pointer"
30+
className="flex cursor-pointer items-center gap-2"
3131
>
32-
<SearchIcon className="w-4 h-4" /> Browse Groups
32+
<SearchIcon className="h-4 w-4" /> Browse Groups
3333
</Link>
3434
</DropdownMenuItem>
3535
<DropdownMenuItem asChild>
36-
<Link href="/docs" className="flex gap-2 items-center cursor-pointer">
37-
<BookIcon className="w-4 h-4" /> API Docs
36+
<Link href="/docs" className="flex cursor-pointer items-center gap-2">
37+
<BookIcon className="h-4 w-4" /> API Docs
3838
</Link>
3939
</DropdownMenuItem>
4040
</DropdownMenuContent>

src/app/_header/mode-toggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function ModeToggle() {
1919
<DropdownMenu>
2020
<DropdownMenuTrigger asChild>
2121
<Button variant="outline" size="icon">
22-
<Sun className="text-black h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
22+
<Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 text-black transition-all dark:-rotate-90 dark:scale-0" />
2323
<Moon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
2424
<span className="sr-only">Toggle theme</span>
2525
</Button>

src/app/api/login/github/callback/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export async function GET(request: Request): Promise<Response> {
4545
headers: {
4646
Authorization: `Bearer ${tokens.accessToken}`,
4747
},
48-
}
48+
},
4949
);
5050
const githubUserEmails = await githubUserEmailResponse.json();
5151

src/app/api/login/google/callback/route.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { getAccountByGoogleIdUseCase } from "@/use-cases/accounts";
66
import { afterLoginUrl } from "@/app-config";
77
import { setSession } from "@/lib/session";
88

9-
109
export async function GET(request: Request): Promise<Response> {
1110
const url = new URL(request.url);
1211
const code = url.searchParams.get("code");
@@ -29,15 +28,15 @@ export async function GET(request: Request): Promise<Response> {
2928
try {
3029
const tokens = await googleAuth.validateAuthorizationCode(
3130
code,
32-
codeVerifier
31+
codeVerifier,
3332
);
3433
const response = await fetch(
3534
"https://openidconnect.googleapis.com/v1/userinfo",
3635
{
3736
headers: {
3837
Authorization: `Bearer ${tokens.accessToken}`,
3938
},
40-
}
39+
},
4140
);
4241
const googleUser: GoogleUser = await response.json();
4342

src/app/api/sign-out/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export async function GET(): Promise<Response> {
1515
cookies().set(
1616
sessionCookie.name,
1717
sessionCookie.value,
18-
sessionCookie.attributes
18+
sessionCookie.attributes,
1919
);
2020
redirect("/signed-out");
2121
}

src/app/error.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function ErrorPage({
88
error: Error & { digest?: string };
99
}) {
1010
return (
11-
<div className="container mx-auto py-12 min-h-screen space-y-8">
11+
<div className="container mx-auto min-h-screen space-y-8 py-12">
1212
<>
1313
<h1 className={pageTitleStyles}>Oops! Something went wrong</h1>
1414
<p className="text-lg">{error.message}</p>

src/app/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ export default async function RootLayout({
4040
<body
4141
className={cn(
4242
"min-h-screen bg-background antialiased",
43-
archivo.variable + " " + libre_franklin.variable
43+
archivo.variable + " " + libre_franklin.variable,
4444
)}
4545
>
4646
<Providers>
4747
<NextTopLoader />
4848
<Header />
49-
<div className="w-full mx-auto container py-12">{children}</div>
49+
<div className="container mx-auto w-full py-12">{children}</div>
5050
</Providers>
5151
<Toaster />
5252
</body>

src/app/signed-out/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default function SignedOutPage() {
1313
}, [router]);
1414

1515
return (
16-
<div className="py-24 mx-auto max-w-[400px] space-y-6">
16+
<div className="mx-auto max-w-[400px] space-y-6 py-24">
1717
<h1 className={pageTitleStyles}>Successfully Signed Out</h1>
1818
<p className="text-xl">
1919
You have been successfully signed out. You can now sign in to your

src/app/verify-success/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Link from "next/link";
44

55
export default function VerifySuccess() {
66
return (
7-
<div className="py-24 mx-auto max-w-[400px] space-y-6">
7+
<div className="mx-auto max-w-[400px] space-y-6 py-24">
88
<h1 className={pageTitleStyles}>Email Successfully Verified</h1>
99
<p className="text-xl">
1010
Your email has been successfully verified. You can now sign in to your

src/components/loader-button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ export function LoaderButton({
1313
disabled={isLoading}
1414
type="submit"
1515
{...props}
16-
className={cn("flex gap-2 justify-center px-3", className)}
16+
className={cn("flex justify-center gap-2 px-3", className)}
1717
>
18-
{isLoading && <Loader2Icon className="animate-spin w-4 h-4" />}
18+
{isLoading && <Loader2Icon className="h-4 w-4 animate-spin" />}
1919
{children}
2020
</Button>
2121
);

src/components/ui/alert.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const alertVariants = cva(
1818
defaultVariants: {
1919
variant: "default",
2020
},
21-
}
21+
},
2222
);
2323

2424
const Alert = React.forwardRef<

0 commit comments

Comments
 (0)