Skip to content

Commit f5294a6

Browse files
ui(empty-state): make Settings link clickable in empty gallery (#964)
Co-authored-by: Rahul Harpal <51887323+rahulharpal1603@users.noreply.github.com>
1 parent 3ff7008 commit f5294a6

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

frontend/src/components/EmptyStates/EmptyGalleryState.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { FolderOpen, Image as ImageIcon } from 'lucide-react';
2+
import { useNavigate } from 'react-router';
3+
import { ROUTES } from '@/constants/routes';
24

35
export const EmptyGalleryState = () => {
6+
const navigate = useNavigate();
7+
48
return (
59
<div className="flex flex-col items-center justify-center py-16 text-center">
610
<div className="mb-6 rounded-full bg-gray-100 p-4 dark:bg-gray-800">
@@ -16,7 +20,17 @@ export const EmptyGalleryState = () => {
1620
<div className="flex flex-col gap-2 text-sm text-gray-400 dark:text-gray-500">
1721
<div className="flex items-center gap-2">
1822
<FolderOpen className="h-4 w-4" />
19-
<span>Go to Settings to add folders.</span>
23+
<span>
24+
Go to{' '}
25+
<button
26+
type="button"
27+
onClick={() => navigate(`/${ROUTES.SETTINGS}`)}
28+
className="rounded text-blue-500 hover:underline focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:outline-none"
29+
>
30+
Settings
31+
</button>{' '}
32+
to add folders.
33+
</span>
2034
</div>
2135
<div className="flex items-center gap-2">
2236
<ImageIcon className="h-4 w-4" />

0 commit comments

Comments
 (0)