File tree Expand file tree Collapse file tree 3 files changed +14
-11
lines changed Expand file tree Collapse file tree 3 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export default async function Page() {
10
10
return (
11
11
< div className = "mx-auto my-10 w-full max-w-5xl space-y-8" >
12
12
< 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' s do something new.</ h3 >
14
14
< span className = "text-muted-foreground text-sm" >
15
15
Select a repository to link with Gitloom and start managing your content.
16
16
</ span >
@@ -29,7 +29,7 @@ export default async function Page() {
29
29
</ div >
30
30
< div className = "flex flex-1 flex-col items-center justify-center gap-2" >
31
31
< 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' soon)</ span >
33
33
</ div >
34
34
</ div >
35
35
</ div >
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export default async function Page() {
22
22
< h4 className = "text-4xl font-black" > Your data is yours.</ h4 >
23
23
< div className = "text-muted-foreground flex gap-2 text-sm" >
24
24
< 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' t rely on any cetralized database.</ span >
26
26
</ div >
27
27
< div className = "text-muted-foreground flex gap-2 text-sm" >
28
28
< FolderLock className = "size-5 shrink-0" />
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { AnimatedCircularProgressBar } from '@/components/magicui/animated-circu
5
5
import { LOCAL_STORAGE_KEYS } from '@/constants' ;
6
6
import { cn , waitFor } from '@/lib/utils' ;
7
7
import { useRouter } from 'next/navigation' ;
8
- import { useEffect , useState } from 'react' ;
8
+ import { useCallback , useEffect , useState } from 'react' ;
9
9
10
10
interface Task {
11
11
pending : boolean ;
@@ -23,14 +23,17 @@ export default function LoginRedirect() {
23
23
} ,
24
24
] ) ;
25
25
26
- function completeAllTasks ( ) : void {
26
+ const completeAllTasks = useCallback ( ( ) => {
27
27
setTasks ( ( prev ) => prev . map ( ( t ) => ( { ...t , pending : false } ) ) ) ;
28
- }
28
+ } , [ setTasks ] ) ;
29
29
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
+ ) ;
34
37
35
38
useEffect ( ( ) => {
36
39
( async ( ) => {
@@ -53,7 +56,7 @@ export default function LoginRedirect() {
53
56
router . push ( `/new` ) ;
54
57
}
55
58
} ) ( ) ;
56
- } , [ ] ) ;
59
+ } , [ addTask , router ] ) ;
57
60
58
61
return (
59
62
< div className = "flex min-h-dvh flex-col items-center justify-center gap-4" >
You can’t perform that action at this time.
0 commit comments