Skip to content

Commit a052a0a

Browse files
committed
chore: help icon in the sidebar bottom
1 parent 0397ba3 commit a052a0a

File tree

3 files changed

+35
-8
lines changed

3 files changed

+35
-8
lines changed

frontend/src/components/Sidebar/Sidebar.tsx

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { Link, useLocation } from 'react-router-dom';
22
import Logo from './Logo';
33
import SourceList from './SourceList';
4+
import HelpIcon from '../icons/HelpIcon';
5+
import HomeIcon from '../icons/HomeIcon';
46
import { cn } from '../../lib/utils';
57
import type { DataSource } from '../../types/datasource';
68

@@ -9,14 +11,6 @@ interface SidebarProps {
911
isLoading: boolean;
1012
}
1113

12-
function HomeIcon() {
13-
return (
14-
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
15-
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
16-
</svg>
17-
);
18-
}
19-
2014
export default function Sidebar({ sources, isLoading }: SidebarProps) {
2115
const location = useLocation();
2216
const isHomeActive = location.pathname === '/';
@@ -38,6 +32,17 @@ export default function Sidebar({ sources, isLoading }: SidebarProps) {
3832
</Link>
3933
<SourceList sources={sources} isLoading={isLoading} />
4034
</nav>
35+
<div className="border-t border-border px-4 py-2">
36+
<a
37+
href="https://dbhub.ai"
38+
target="_blank"
39+
rel="noopener noreferrer"
40+
className="flex items-center gap-3 px-2 py-1 text-sm text-muted-foreground transition-colors hover:text-foreground cursor-pointer"
41+
>
42+
<HelpIcon />
43+
<span>Help</span>
44+
</a>
45+
</div>
4146
</aside>
4247
);
4348
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
interface HelpIconProps {
2+
className?: string;
3+
}
4+
5+
export default function HelpIcon({ className = 'w-5 h-5' }: HelpIconProps) {
6+
return (
7+
<svg className={className} fill="none" viewBox="0 0 24 24" stroke="currentColor">
8+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
9+
</svg>
10+
);
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
interface HomeIconProps {
2+
className?: string;
3+
}
4+
5+
export default function HomeIcon({ className = 'w-5 h-5' }: HomeIconProps) {
6+
return (
7+
<svg className={className} fill="none" viewBox="0 0 24 24" stroke="currentColor">
8+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
9+
</svg>
10+
);
11+
}

0 commit comments

Comments
 (0)