File tree 5 files changed +41
-35
lines changed
5 files changed +41
-35
lines changed Original file line number Diff line number Diff line change 1
- import Link from " next/link" ;
2
- import styles from " ../styles/Nav.module.css" ;
3
- import ThemeToggle from " ./ThemeToggle" ;
1
+ import Link from ' next/link' ;
2
+ import styles from ' ../styles/Nav.module.css' ;
3
+ import ThemeToggle from ' ./ThemeToggle' ;
4
4
5
5
const NavBar = ( ) => {
6
6
return (
7
7
< div className = { styles . container } >
8
8
< Link
9
- href = "/"
9
+ href = '/'
10
10
className = { styles . signature }
11
11
>
12
12
Lee
13
13
</ Link >
14
14
< nav className = { styles . nav } >
15
15
{ /* Mobile Icon */ }
16
- < Link href = " /blog" >
16
+ < Link href = ' /blog' >
17
17
< span className = { `iconfont ${ styles . mobile } ${ styles . icon } ` } >
18
18

19
19
</ span >
20
20
</ Link >
21
- < Link href = " /project" >
21
+ < Link href = ' /project' >
22
22
< span className = { `iconfont ${ styles . mobile } ${ styles . icon } ` } >
23
-  ;
23
+  ;
24
24
</ span >
25
25
</ Link >
26
26
27
27
{ /* Laptop Link */ }
28
28
< Link
29
- href = "/"
29
+ href = '/'
30
30
className = { `${ styles . link } ${ styles . laptop } ` }
31
31
>
32
32
Me
33
33
</ Link >
34
34
< Link
35
- href = " /blog"
35
+ href = ' /blog'
36
36
className = { `${ styles . link } ${ styles . laptop } ` }
37
37
>
38
38
Blog
39
39
</ Link >
40
40
< Link
41
- href = " /project"
41
+ href = ' /project'
42
42
className = { `${ styles . link } ${ styles . laptop } ` }
43
43
>
44
44
Projects
45
45
</ Link >
46
46
47
47
{ /* Other Icon */ }
48
48
< Link
49
- href = " https://github.com/LeeZ1Q"
50
- rel = " noreferrer"
51
- target = " _blank"
49
+ href = ' https://github.com/LeeZ1Q'
50
+ rel = ' noreferrer'
51
+ target = ' _blank'
52
52
className = { `iconfont ${ styles . icon } ` }
53
53
>
54
-  ;
54
+  ;
55
55
</ Link >
56
56
< Link
57
- href = " https://space.bilibili.com/67972196"
58
- rel = " noreferrer"
59
- target = " _blank"
57
+ href = ' https://space.bilibili.com/67972196'
58
+ rel = ' noreferrer'
59
+ target = ' _blank'
60
60
className = { `iconfont ${ styles . icon } ` }
61
61
>
62
62

Original file line number Diff line number Diff line change 1
- " use client" ;
1
+ ' use client' ;
2
2
3
- import React , { useEffect , useState } from " react" ;
4
- import { useTheme } from " next-themes" ;
5
- import styles from " ../styles/Nav.module.css" ;
3
+ import React , { useEffect , useState } from ' react' ;
4
+ import { useTheme } from ' next-themes' ;
5
+ import styles from ' ../styles/Nav.module.css' ;
6
6
7
7
const ThemeToggle = ( ) => {
8
8
const [ mounted , setMounted ] = useState ( false ) ;
@@ -11,13 +11,13 @@ const ThemeToggle = () => {
11
11
useEffect ( ( ) => setMounted ( true ) , [ ] ) ;
12
12
13
13
if ( ! mounted )
14
- return < span className = { `iconfont ${ styles . icon } loading` } >  ;</ span > ;
14
+ return < span className = { `iconfont ${ styles . icon } loading` } >  ;</ span > ;
15
15
16
16
const toggleTheme = ( ) => {
17
- if ( theme === " light" ) {
18
- setTheme ( " dark" ) ;
17
+ if ( theme === ' light' ) {
18
+ setTheme ( ' dark' ) ;
19
19
} else {
20
- setTheme ( " light" ) ;
20
+ setTheme ( ' light' ) ;
21
21
}
22
22
} ;
23
23
@@ -26,7 +26,7 @@ const ThemeToggle = () => {
26
26
className = { `iconfont ${ styles . icon } ` }
27
27
onClick = { toggleTheme }
28
28
>
29
- 
29
+ { theme === 'light' ? '\ue600' : '\ue6dc' }
30
30
</ span >
31
31
) ;
32
32
} ;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ const Project = () => {
22
22
< Item
23
23
name = 'mini-react'
24
24
description = 'A mini React that implements React core concepts.'
25
- icon = ' ;'
25
+ icon = ' ;'
26
26
repo = 'https://github.com/LeeZ1Q/mini-react'
27
27
/>
28
28
< Item
@@ -31,16 +31,10 @@ const Project = () => {
31
31
icon = ''
32
32
repo = 'https://github.com/LeeZ1Q/mini-redux'
33
33
/>
34
- < Item
35
- name = 'react-dnd-playground'
36
- description = 'React drag and drop examples playground.'
37
- icon = ''
38
- repo = 'https://github.com/LeeZ1Q/react-dnd-playground'
39
- />
40
34
< Item
41
35
name = 'Book Finder'
42
36
description = 'A Book Searching Website using Google Book API.'
43
- icon = ' ;'
37
+ icon = ' ;'
44
38
repo = 'https://github.com/LeeZ1Q/bookfinder'
45
39
/>
46
40
< Item
@@ -52,6 +46,18 @@ const Project = () => {
52
46
</ div >
53
47
< p className = { styles . title } > Demo</ p >
54
48
< div className = { styles . list } >
49
+ < Item
50
+ name = 'debounce-throttle-demo'
51
+ description = 'A playground to try debouncing and throtting.'
52
+ icon = ''
53
+ repo = 'https://github.com/LeeZ1Q/debounce-throttle-playground'
54
+ />
55
+ < Item
56
+ name = 'react-dnd-playground'
57
+ description = 'React drag and drop examples playground.'
58
+ icon = ''
59
+ repo = 'https://github.com/LeeZ1Q/react-dnd-playground'
60
+ />
55
61
< Item
56
62
name = 'dark-mode-toggle'
57
63
description = 'A dark mode demo.'
Original file line number Diff line number Diff line change 28
28
"eslint" : " 8.40.0" ,
29
29
"eslint-config-next" : " 13.4.2"
30
30
}
31
- }
31
+ }
You can’t perform that action at this time.
0 commit comments