Skip to content

Commit

Permalink
fix: review
Browse files Browse the repository at this point in the history
  • Loading branch information
dougfabris committed Aug 30, 2021
1 parent d1800f0 commit bfc0b97
Showing 1 changed file with 28 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ import RequestTrialForm from '../../forms/RequestTrialForm';
import Description from './Description';

type RequestTrialPageProps = {
onManageWorkspaces: () => void;
onManageWorkspaces?: () => void;
manageWorkspacesLink?: string;
} & ComponentProps<typeof RequestTrialForm>;

const RequestTrialPage = (props: RequestTrialPageProps): ReactElement => {
const { t } = useTranslation();
const pointer = css`
cursor: pointer;
`;

return (
<BackgroundLayer>
Expand All @@ -23,7 +27,7 @@ const RequestTrialPage = (props: RequestTrialPageProps): ReactElement => {
subtitle={t('page.requestTrial.subtitle')}
>
<RequestTrialForm {...props} />
{props.onManageWorkspaces && (
{(props.onManageWorkspaces || props.manageWorkspacesLink) && (
<Box
mbs='x28'
color='alternative'
Expand All @@ -32,18 +36,28 @@ const RequestTrialPage = (props: RequestTrialPageProps): ReactElement => {
>
<Trans i18nKey='page.alreadyHaveAccount'>
Already have an account?
<Box
className={css`
cursor: pointer;
`}
onClick={props.onManageWorkspaces}
is='span'
cursor='pointer'
color='primary-400'
textDecorationLine='none'
>
Manage your workspaces.
</Box>
{props.onManageWorkspaces && (
<Box
className={pointer}
onClick={props.onManageWorkspaces}
is='span'
color='primary-400'
textDecorationLine='none'
>
Manage your workspaces.
</Box>
)}
{props.manageWorkspacesLink && (
<Box
className={pointer}
href={props.manageWorkspacesLink}
is='a'
color='primary-400'
textDecorationLine='none'
>
Manage your workspaces.
</Box>
)}
</Trans>
</Box>
)}
Expand Down

0 comments on commit bfc0b97

Please sign in to comment.