Skip to content

Commit 98991f1

Browse files
committed
fix: update sidebar footer
1 parent 1a39b78 commit 98991f1

File tree

1 file changed

+50
-16
lines changed

1 file changed

+50
-16
lines changed

website/app/components/sidebarFooter.tsx

+50-16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
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';
39

410
interface NPM_REGISTRY_RESULT {
511
_id: string;
@@ -23,32 +29,60 @@ const SidebarFooter = () => {
2329
fetcher,
2430
);
2531
const version = data?.['dist-tags']?.latest;
32+
const iconSize = 14;
33+
const externalStrokeIcon = 1.4;
2634

2735
return (
2836
<div className="w-full border-b-2 border-dashed border-neutral-200 py-2 text-sm dark:border-neutral-800">
2937
<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>
4360
</div>
4461
<a
4562
href="https://github.com/pheralb/toast/issues/new"
4663
target="_blank"
4764
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"
4966
>
67+
<AlertTriangleIcon
68+
className="mr-1 group-hover:stroke-yellow-600 dark:group-hover:stroke-yellow-500"
69+
height={iconSize}
70+
/>
5071
<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} />
5286
</a>
5387
</div>
5488
);

0 commit comments

Comments
 (0)