2
2
3
3
import { HomeOutlined , QuestionCircleOutlined , UserOutlined } from '@ant-design/icons' ;
4
4
import Link from 'next/link' ;
5
+ import { usePathname } from 'next/navigation' ;
5
6
6
7
import HelpMenu from '@/components/HelpMenu' ;
7
8
import { DocumentationIcon } from '@/components/icons' ;
8
9
import UserMenu from '@/components/user-menu' ;
9
10
import { classNames } from '@/util/utils' ;
10
11
11
12
export default function Profile ( ) {
13
+ const pathName = usePathname ( ) ;
14
+
12
15
return (
13
16
< div className = "mt-auto flex flex-col gap-4" >
17
+ { pathName !== '/app/virtual-lab' && (
18
+ < Link
19
+ href = "/app/virtual-lab"
20
+ aria-label = "home"
21
+ type = "button"
22
+ className = { classNames (
23
+ 'flex w-max items-center justify-center p-3' ,
24
+ 'text-white transition-all duration-200' ,
25
+ 'border border-primary-6 hover:border-primary-5 hover:bg-primary-5'
26
+ ) }
27
+ >
28
+ < HomeOutlined className = "text-xl" />
29
+ </ Link >
30
+ ) }
14
31
< Link
15
32
href = "/app/documentation"
16
33
aria-label = "documentation"
@@ -37,18 +54,6 @@ export default function Profile() {
37
54
< QuestionCircleOutlined className = "text-xl" />
38
55
</ div >
39
56
</ HelpMenu >
40
- < Link
41
- href = "/app/virtual-lab"
42
- aria-label = "home"
43
- type = "button"
44
- className = { classNames (
45
- 'flex w-max items-center justify-center p-3' ,
46
- 'text-white transition-all duration-200' ,
47
- 'border border-primary-6 hover:border-primary-5 hover:bg-primary-5'
48
- ) }
49
- >
50
- < HomeOutlined className = "text-xl" />
51
- </ Link >
52
57
< UserMenu
53
58
cls = { {
54
59
trigger : '!p-0' ,
0 commit comments