1
1
import useSWR from 'swr' ;
2
- import { ArrowUpRight , Loader } from 'lucide-react' ;
2
+ import {
3
+ AlertTriangleIcon ,
4
+ ArrowUpRight ,
5
+ BoxIcon ,
6
+ HeartIcon ,
7
+ Loader ,
8
+ } from 'lucide-react' ;
3
9
4
10
interface NPM_REGISTRY_RESULT {
5
11
_id : string ;
@@ -23,32 +29,60 @@ const SidebarFooter = () => {
23
29
fetcher ,
24
30
) ;
25
31
const version = data ?. [ 'dist-tags' ] ?. latest ;
32
+ const iconSize = 14 ;
33
+ const externalStrokeIcon = 1.4 ;
26
34
27
35
return (
28
36
< div className = "w-full border-b-2 border-dashed border-neutral-200 py-2 text-sm dark:border-neutral-800" >
29
37
< div className = "font-medium" >
30
- { isLoading ? (
31
- < Loader className = "animate-spin" size = { 14 } />
32
- ) : (
33
- < a
34
- href = { `https://github.com/pheralb/toast/releases/tag/v${ version } ` }
35
- target = "_blank"
36
- rel = "noreferrer"
37
- className = "flex items-center py-1 text-neutral-600 transition-colors duration-100 hover:text-black dark:text-neutral-400 dark:decoration-neutral-700 dark:hover:text-white"
38
- >
39
- < span > v{ version } </ span >
40
- < ArrowUpRight height = { 12 } />
41
- </ a >
42
- ) }
38
+ < a
39
+ href = { `https://github.com/pheralb/toast/releases/tag/v${ version } ` }
40
+ target = "_blank"
41
+ rel = "noreferrer"
42
+ className = "group flex items-center py-1 text-neutral-600 transition-colors duration-100 hover:text-black dark:text-neutral-400 dark:decoration-neutral-700 dark:hover:text-white"
43
+ >
44
+ { isLoading ? (
45
+ < >
46
+ < Loader className = "mr-1 animate-spin duration-700" size = { 12 } />
47
+ < span > Searching...</ span >
48
+ </ >
49
+ ) : (
50
+ < >
51
+ < BoxIcon
52
+ className = "mr-1 group-hover:stroke-pink-600 dark:group-hover:stroke-pink-500"
53
+ height = { iconSize }
54
+ />
55
+ < span > v{ version } </ span >
56
+ </ >
57
+ ) }
58
+ < ArrowUpRight height = { iconSize } strokeWidth = { externalStrokeIcon } />
59
+ </ a >
43
60
</ div >
44
61
< a
45
62
href = "https://github.com/pheralb/toast/issues/new"
46
63
target = "_blank"
47
64
rel = "noreferrer"
48
- className = "flex items-center py-1 text-neutral-600 transition-colors duration-100 hover:text-black dark:text-neutral-400 dark:decoration-neutral-700 dark:hover:text-white"
65
+ className = "group flex items-center py-1 text-neutral-600 transition-colors duration-100 hover:text-black dark:text-neutral-400 dark:decoration-neutral-700 dark:hover:text-white"
49
66
>
67
+ < AlertTriangleIcon
68
+ className = "mr-1 group-hover:stroke-yellow-600 dark:group-hover:stroke-yellow-500"
69
+ height = { iconSize }
70
+ />
50
71
< span > Found a bug?</ span >
51
- < ArrowUpRight height = { 12 } />
72
+ < ArrowUpRight height = { 12 } strokeWidth = { externalStrokeIcon } />
73
+ </ a >
74
+ < a
75
+ href = "https://pheralb.dev"
76
+ target = "_blank"
77
+ rel = "noreferrer"
78
+ className = "group flex items-center py-1 text-neutral-600 transition-colors duration-100 hover:text-black dark:text-neutral-400 dark:decoration-neutral-700 dark:hover:text-white"
79
+ >
80
+ < HeartIcon
81
+ className = "mr-1 group-hover:animate-pulse group-hover:stroke-red-600"
82
+ height = { iconSize }
83
+ />
84
+ < span > Built by pheralb</ span >
85
+ < ArrowUpRight height = { 12 } strokeWidth = { externalStrokeIcon } />
52
86
</ a >
53
87
</ div >
54
88
) ;
0 commit comments