-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: split up sign up account type component
- Loading branch information
Showing
6 changed files
with
184 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
packages/apps/human-app/frontend/src/modules/homepage/components/operator-sign-up.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import { Grid, Typography, List, ListItemText, Button } from '@mui/material'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { Link } from 'react-router-dom'; | ||
import { routerPaths } from '@/router/router-paths'; | ||
import { useColorMode } from '@/shared/contexts/color-mode'; | ||
import { useIsMobile } from '@/shared/hooks/use-is-mobile'; | ||
import { onlyDarkModeColor } from '@/shared/styles/dark-color-palette'; | ||
|
||
export function OperatorSignUp() { | ||
const { colorPalette, isDarkMode } = useColorMode(); | ||
const { t } = useTranslation(); | ||
const isMobile = useIsMobile('lg'); | ||
|
||
return ( | ||
<Grid | ||
item | ||
sx={{ | ||
paddingTop: '44px', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
justifyContent: 'space-between', | ||
}} | ||
xs={isMobile ? 12 : 6} | ||
> | ||
<div> | ||
<Typography | ||
color={ | ||
isDarkMode | ||
? onlyDarkModeColor.additionalTextColor | ||
: colorPalette.primary.light | ||
} | ||
variant="h6" | ||
> | ||
{t('homepage.joinAsOperator')} | ||
</Typography> | ||
<List | ||
sx={{ | ||
listStyleType: 'disc', | ||
listStylePosition: 'inside', | ||
paddingLeft: '0.5rem', | ||
}} | ||
> | ||
<ListItemText | ||
primary={t('homepage.becomePartner')} | ||
primaryTypographyProps={{ | ||
variant: 'subtitle2', | ||
sx: { | ||
display: 'list-item', | ||
}, | ||
}} | ||
/> | ||
<ListItemText | ||
primary={t('homepage.runAsOracle')} | ||
primaryTypographyProps={{ | ||
variant: 'subtitle2', | ||
sx: { | ||
display: 'list-item', | ||
}, | ||
}} | ||
/> | ||
</List> | ||
</div> | ||
<Grid | ||
sx={{ | ||
display: 'flex', | ||
alignItems: 'flex-end', | ||
justifyContent: 'flex-end', | ||
paddingTop: '2rem', | ||
}} | ||
xs={12} | ||
> | ||
<Button | ||
component={Link} | ||
fullWidth | ||
size="large" | ||
sx={{ fontFamily: 'Inter' }} | ||
to={routerPaths.operator.connectWallet} | ||
variant="contained" | ||
> | ||
{t('homepage.signAsOperator')} | ||
</Button> | ||
</Grid> | ||
</Grid> | ||
); | ||
} |
91 changes: 91 additions & 0 deletions
91
packages/apps/human-app/frontend/src/modules/homepage/components/worker-sign-up.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import { Grid, Typography, List, ListItemText, Button } from '@mui/material'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { Link } from 'react-router-dom'; | ||
import { routerPaths } from '@/router/router-paths'; | ||
import { useColorMode } from '@/shared/contexts/color-mode'; | ||
import { useIsMobile } from '@/shared/hooks/use-is-mobile'; | ||
import { onlyDarkModeColor } from '@/shared/styles/dark-color-palette'; | ||
|
||
export function WorkerSignUp() { | ||
const { colorPalette, isDarkMode } = useColorMode(); | ||
const { t } = useTranslation(); | ||
const isMobile = useIsMobile('lg'); | ||
|
||
return ( | ||
<Grid | ||
item | ||
sx={{ | ||
paddingTop: '44px', | ||
}} | ||
xs={isMobile ? 12 : 6} | ||
> | ||
<Grid | ||
sx={{ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
height: '100%', | ||
justifyContent: 'space-between', | ||
}} | ||
> | ||
<div> | ||
<Typography | ||
color={ | ||
isDarkMode | ||
? onlyDarkModeColor.additionalTextColor | ||
: colorPalette.primary.light | ||
} | ||
variant="h6" | ||
> | ||
{t('homepage.iWantToEarn')} | ||
</Typography> | ||
<List | ||
sx={{ | ||
listStyleType: 'disc', | ||
listStylePosition: 'inside', | ||
paddingLeft: '0.5rem', | ||
}} | ||
> | ||
<ListItemText | ||
primary={t('homepage.completeTask')} | ||
primaryTypographyProps={{ | ||
variant: 'subtitle2', | ||
sx: { | ||
display: 'list-item', | ||
}, | ||
}} | ||
/> | ||
<ListItemText | ||
primary={t('homepage.workAnywhere')} | ||
primaryTypographyProps={{ | ||
variant: 'subtitle2', | ||
sx: { | ||
display: 'list-item', | ||
}, | ||
}} | ||
/> | ||
</List> | ||
</div> | ||
<Grid | ||
sx={{ | ||
display: 'flex', | ||
alignItems: 'flex-end', | ||
justifyContent: 'flex-end', | ||
paddingTop: '2rem', | ||
}} | ||
xs={12} | ||
> | ||
<Button | ||
component={Link} | ||
fullWidth | ||
size="large" | ||
sx={{ fontFamily: 'Inter' }} | ||
to={routerPaths.worker.signUp} | ||
variant="contained" | ||
> | ||
{t('homepage.signUpToComplete')} | ||
</Button> | ||
</Grid> | ||
</Grid> | ||
</Grid> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './views'; |
1 change: 1 addition & 0 deletions
1
packages/apps/human-app/frontend/src/modules/homepage/views/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './home.page'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters