1
+ import classNames from 'classnames'
1
2
import { useLogout } from 'data-services/hooks/auth/useLogout'
2
3
import { Button , ButtonTheme } from 'design-system/components/button/button'
3
- import { Link , useLocation , useNavigate } from 'react-router-dom'
4
- import { APP_ROUTES } from 'utils/constants'
4
+ import buttonStyles from 'design-system/components/button/button.module.scss'
5
+ import { Icon , IconTheme , IconType } from 'design-system/components/icon/icon'
6
+ import { Link , useLocation } from 'react-router-dom'
7
+ import { APP_ROUTES , LANDING_PAGE_URL } from 'utils/constants'
5
8
import { STRING , translate } from 'utils/language'
6
9
import { usePageTitle } from 'utils/usePageTitle'
7
10
import { useUser } from 'utils/user/userContext'
@@ -12,7 +15,6 @@ import { VersionInfo } from './version-info/version-info'
12
15
13
16
export const Header = ( ) => {
14
17
const location = useLocation ( )
15
- const navigate = useNavigate ( )
16
18
const { user } = useUser ( )
17
19
const { logout, isLoading : isLogoutLoading } = useLogout ( )
18
20
@@ -32,11 +34,25 @@ export const Header = () => {
32
34
< VersionInfo />
33
35
< div className = { styles . rightContent } >
34
36
< div className = { styles . infoPages } >
35
- < Button
36
- label = "Terms of Service"
37
- theme = { ButtonTheme . Plain }
38
- onClick = { ( ) => navigate ( APP_ROUTES . TERMS_OF_SERVICE ) }
39
- />
37
+ < a
38
+ href = { LANDING_PAGE_URL }
39
+ rel = "noreferrer"
40
+ target = "_blank"
41
+ className = { classNames ( buttonStyles . button , buttonStyles . plain ) }
42
+ >
43
+ < span className = { buttonStyles . label } > About Antenna</ span >
44
+ < Icon
45
+ type = { IconType . ExternalLink }
46
+ theme = { IconTheme . Primary }
47
+ size = { 14 }
48
+ />
49
+ </ a >
50
+ < Link
51
+ to = { APP_ROUTES . TERMS_OF_SERVICE }
52
+ className = { classNames ( buttonStyles . button , buttonStyles . plain ) }
53
+ >
54
+ < span className = { buttonStyles . label } > Terms of Service</ span >
55
+ </ Link >
40
56
</ div >
41
57
{ user . loggedIn ? (
42
58
< >
@@ -49,15 +65,15 @@ export const Header = () => {
49
65
< UserInfoDialog />
50
66
</ >
51
67
) : (
52
- < >
53
- < Button
54
- label = { translate ( STRING . LOGIN ) }
55
- theme = { ButtonTheme . Plain }
56
- onClick = { ( ) = >
57
- navigate ( APP_ROUTES . LOGIN , { state : { to : location . pathname } } )
58
- }
59
- / >
60
- </ >
68
+ < Link
69
+ to = { APP_ROUTES . LOGIN }
70
+ state = { { to : location . pathname } }
71
+ className = { classNames ( buttonStyles . button , buttonStyles . plain ) }
72
+ >
73
+ < span className = { buttonStyles . label } >
74
+ { translate ( STRING . LOGIN ) }
75
+ </ span >
76
+ </ Link >
61
77
) }
62
78
</ div >
63
79
</ header >
0 commit comments