diff --git a/src/features/register/RegisterHub.tsx b/src/features/register/RegisterHub.tsx index e902760..2aad5f9 100644 --- a/src/features/register/RegisterHub.tsx +++ b/src/features/register/RegisterHub.tsx @@ -1,6 +1,8 @@ import { useEffect, useState } from 'react'; import { useNavigate } from 'react-router-dom'; -import { Box, Card, CardActionArea, CardContent, Stack, Typography } from '@mui/material'; +import { Avatar, Box, Card, CardActionArea, CardContent, Stack, Typography } from '@mui/material'; +import { alpha } from '@mui/material/styles'; +import ArrowForward from '@mui/icons-material/ArrowForward'; import ArrowBack from '@mui/icons-material/ArrowBack'; import BusinessOutlined from '@mui/icons-material/BusinessOutlined'; import BusinessCenterOutlined from '@mui/icons-material/BusinessCenterOutlined'; @@ -13,12 +15,12 @@ import { Logo } from '../../components/Logo'; import { OtpDialog } from './OtpDialog'; import type { OtpEntity } from '../../api/register'; -const CARDS: { entity: string; icon: typeof BusinessOutlined; desc: 'registerCompaniesDesc' | 'registerInvestorsDesc' | 'registerOtherStakeholdersDesc' | 'registerOwnersDesc' | 'registerFreezoneDesc'; otp?: boolean }[] = [ - { entity: 'COMPANIES', icon: BusinessOutlined, desc: 'registerCompaniesDesc' }, - { entity: 'INVESTORS', icon: BusinessCenterOutlined, desc: 'registerInvestorsDesc' }, - { entity: 'OTHER_STAKEHOLDERS', icon: GroupsOutlined, desc: 'registerOtherStakeholdersDesc' }, - { entity: 'OWNERS', icon: PersonOutline, desc: 'registerOwnersDesc', otp: true }, - { entity: 'FREEZONE_CLEARING_COMPANIES', icon: LocalShippingOutlined, desc: 'registerFreezoneDesc', otp: true }, +const CARDS: { entity: string; tint: string; icon: typeof BusinessOutlined; desc: 'registerCompaniesDesc' | 'registerInvestorsDesc' | 'registerOtherStakeholdersDesc' | 'registerOwnersDesc' | 'registerFreezoneDesc'; otp?: boolean }[] = [ + { entity: 'COMPANIES', tint: '#2c98d4', icon: BusinessOutlined, desc: 'registerCompaniesDesc' }, + { entity: 'INVESTORS', tint: '#2e9e6b', icon: BusinessCenterOutlined, desc: 'registerInvestorsDesc' }, + { entity: 'OTHER_STAKEHOLDERS', tint: '#8a6fd1', icon: GroupsOutlined, desc: 'registerOtherStakeholdersDesc' }, + { entity: 'OWNERS', tint: '#d9a441', icon: PersonOutline, desc: 'registerOwnersDesc', otp: true }, + { entity: 'FREEZONE_CLEARING_COMPANIES', tint: '#d9627a', icon: LocalShippingOutlined, desc: 'registerFreezoneDesc', otp: true }, ]; export function RegisterHub() { @@ -39,7 +41,14 @@ export function RegisterHub() { }; return ( - + `radial-gradient(circle at 85% -10%, ${alpha(th.palette.primary.main, 0.1)}, transparent 45%)`, + }}> {ui('registerHubSubtitle')} - - {CARDS.map(({ entity, icon: Icon, desc, otp }) => ( - + + {CARDS.map(({ entity, tint, icon: Icon, desc, otp }) => ( + + {/* a large faint copy of the icon behind the text, like the dashboard cards */} + pick(entity, otp)} sx={{ height: '100%', p: 0.5 }}> - - - {t(entity)} - {ui(desc)} + + + + + {t(entity)} + {ui(desc)} + ({ mt: 1.5, color: tint, opacity: 0.45, transition: 'opacity .18s', transform: th.direction === 'rtl' ? 'scaleX(-1)' : 'none' })} + />