File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ import clsx from 'clsx' ;
2
+ import { Link } from 'react-router-dom' ;
3
+ import type { LinkProps } from 'react-router-dom' ;
4
+
5
+ import SystemLogo from '@/components/SystemLogo' ;
6
+
7
+ interface Props extends Omit < LinkProps , 'to' > {
8
+ /** Whether to show the title */
9
+ showTitle ?: boolean ;
10
+ }
11
+ const GlobalLogo : FC < Props > = memo ( ( { className, showTitle = true , ...props } ) => {
12
+ const { t } = useTranslation ( ) ;
13
+
14
+ return (
15
+ < Link
16
+ className = { clsx ( 'w-full flex-center nowrap-hidden' , className ) }
17
+ to = "/"
18
+ { ...props }
19
+ >
20
+ < SystemLogo className = "text-32px text-primary" />
21
+ < h2
22
+ className = "pl-8px text-16px text-primary font-bold transition duration-300 ease-in-out"
23
+ style = { { display : showTitle ? 'block' : 'none' } }
24
+ >
25
+ { t ( 'system.title' ) }
26
+ </ h2 >
27
+ </ Link >
28
+ ) ;
29
+ } ) ;
30
+
31
+ export default GlobalLogo ;
You can’t perform that action at this time.
0 commit comments