Skip to content

Commit e3e6953

Browse files
authored
fix: lint errors (#12)
* ci: build github workflow * fix: ci pnpm not found * chore: update * fix: use `'` for comma * fix: code errors
1 parent 7ac2a6c commit e3e6953

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

src/app/(app)/new/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default async function Page() {
1010
return (
1111
<div className="mx-auto my-10 w-full max-w-5xl space-y-8">
1212
<div className="flex flex-col gap-2">
13-
<h3 className="text-4xl font-black">Let's do something new.</h3>
13+
<h3 className="text-4xl font-black">Let&apos;s do something new.</h3>
1414
<span className="text-muted-foreground text-sm">
1515
Select a repository to link with Gitloom and start managing your content.
1616
</span>
@@ -29,7 +29,7 @@ export default async function Page() {
2929
</div>
3030
<div className="flex flex-1 flex-col items-center justify-center gap-2">
3131
<Construction className="text-muted-foreground size-10 stroke-1" />
32-
<span className="text-muted-foreground text-sm">(Feature comin' soon)</span>
32+
<span className="text-muted-foreground text-sm">(Feature comin&apos; soon)</span>
3333
</div>
3434
</div>
3535
</div>

src/app/(auth)/login/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default async function Page() {
2222
<h4 className="text-4xl font-black">Your data is yours.</h4>
2323
<div className="text-muted-foreground flex gap-2 text-sm">
2424
<Box className="size-5 shrink-0" />
25-
<span>Gitloom is decentralized and doesn't rely on any cetralized database.</span>
25+
<span>Gitloom is decentralized and doesn&apos;t rely on any cetralized database.</span>
2626
</div>
2727
<div className="text-muted-foreground flex gap-2 text-sm">
2828
<FolderLock className="size-5 shrink-0" />

src/app/(auth)/login/success/login-redirect.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { AnimatedCircularProgressBar } from '@/components/magicui/animated-circu
55
import { LOCAL_STORAGE_KEYS } from '@/constants';
66
import { cn, waitFor } from '@/lib/utils';
77
import { useRouter } from 'next/navigation';
8-
import { useEffect, useState } from 'react';
8+
import { useCallback, useEffect, useState } from 'react';
99

1010
interface Task {
1111
pending: boolean;
@@ -23,14 +23,17 @@ export default function LoginRedirect() {
2323
},
2424
]);
2525

26-
function completeAllTasks(): void {
26+
const completeAllTasks = useCallback(() => {
2727
setTasks((prev) => prev.map((t) => ({ ...t, pending: false })));
28-
}
28+
}, [setTasks]);
2929

30-
function addTask(task: Task): void {
31-
completeAllTasks();
32-
setTasks((prev) => [...prev, task]);
33-
}
30+
const addTask = useCallback(
31+
(task: Task) => {
32+
completeAllTasks();
33+
setTasks((prev) => [...prev, task]);
34+
},
35+
[completeAllTasks, setTasks],
36+
);
3437

3538
useEffect(() => {
3639
(async () => {
@@ -53,7 +56,7 @@ export default function LoginRedirect() {
5356
router.push(`/new`);
5457
}
5558
})();
56-
}, []);
59+
}, [addTask, router]);
5760

5861
return (
5962
<div className="flex min-h-dvh flex-col items-center justify-center gap-4">

0 commit comments

Comments
 (0)