@@ -9,11 +9,15 @@ import RequestTrialForm from '../../forms/RequestTrialForm';
9
9
import Description from './Description' ;
10
10
11
11
type RequestTrialPageProps = {
12
- onManageWorkspaces : ( ) => void ;
12
+ onManageWorkspaces ?: ( ) => void ;
13
+ manageWorkspacesLink ?: string ;
13
14
} & ComponentProps < typeof RequestTrialForm > ;
14
15
15
16
const RequestTrialPage = ( props : RequestTrialPageProps ) : ReactElement => {
16
17
const { t } = useTranslation ( ) ;
18
+ const pointer = css `
19
+ cursor : pointer;
20
+ ` ;
17
21
18
22
return (
19
23
< BackgroundLayer >
@@ -23,7 +27,7 @@ const RequestTrialPage = (props: RequestTrialPageProps): ReactElement => {
23
27
subtitle = { t ( 'page.requestTrial.subtitle' ) }
24
28
>
25
29
< RequestTrialForm { ...props } />
26
- { props . onManageWorkspaces && (
30
+ { ( props . onManageWorkspaces || props . manageWorkspacesLink ) && (
27
31
< Box
28
32
mbs = 'x28'
29
33
color = 'alternative'
@@ -32,18 +36,28 @@ const RequestTrialPage = (props: RequestTrialPageProps): ReactElement => {
32
36
>
33
37
< Trans i18nKey = 'page.alreadyHaveAccount' >
34
38
Already have an account?
35
- < Box
36
- className = { css `
37
- cursor : pointer;
38
- ` }
39
- onClick = { props . onManageWorkspaces }
40
- is = 'span'
41
- cursor = 'pointer'
42
- color = 'primary-400'
43
- textDecorationLine = 'none'
44
- >
45
- Manage your workspaces.
46
- </ Box >
39
+ { props . onManageWorkspaces && (
40
+ < Box
41
+ className = { pointer }
42
+ onClick = { props . onManageWorkspaces }
43
+ is = 'span'
44
+ color = 'primary-400'
45
+ textDecorationLine = 'none'
46
+ >
47
+ Manage your workspaces.
48
+ </ Box >
49
+ ) }
50
+ { props . manageWorkspacesLink && (
51
+ < Box
52
+ className = { pointer }
53
+ href = { props . manageWorkspacesLink }
54
+ is = 'a'
55
+ color = 'primary-400'
56
+ textDecorationLine = 'none'
57
+ >
58
+ Manage your workspaces.
59
+ </ Box >
60
+ ) }
47
61
</ Trans >
48
62
</ Box >
49
63
) }
0 commit comments