diff --git a/.eslintrc.cjs b/.eslintrc.cjs index bca81c5..e8e5fc7 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -51,5 +51,6 @@ module.exports = { 'react/function-component-definition': 'off', 'react-hooks/exhaustive-deps': 'off', 'react/prop-types': 'off', + 'react/jsx-props-no-spreading': 'off', }, }; diff --git a/src/components/shared/CustomBreadcrumb.tsx b/src/components/shared/CustomBreadcrumb.tsx new file mode 100644 index 0000000..dda4dbb --- /dev/null +++ b/src/components/shared/CustomBreadcrumb.tsx @@ -0,0 +1,59 @@ +import * as React from 'react'; +import { SvgIconComponent } from '@mui/icons-material'; +import Breadcrumbs, { BreadcrumbsProps } from '@mui/material/Breadcrumbs'; +import Link from '@mui/material/Link'; +import Typography from '@mui/material/Typography'; + +interface BreadcrumbItem { + label: string; + href?: string; + icon?: SvgIconComponent; +} + +interface CustomBreadcrumbProps extends BreadcrumbsProps { + breadcrumbs: BreadcrumbItem[]; +} + +const CustomBreadcrumb: React.FC = ({ + breadcrumbs, + ...props +}) => { + return ( +
+ + {breadcrumbs.map((breadcrumb) => + breadcrumb.href ? ( + + {breadcrumb.icon && ( + + )} + {breadcrumb.label} + + ) : ( + + {breadcrumb.icon && ( + + )} + {breadcrumb.label} + + ) + )} + +
+ ); +}; + +export default CustomBreadcrumb; diff --git a/src/components/shared/CustomTable.tsx b/src/components/shared/CustomTable.tsx index 79bf71e..3b32428 100644 --- a/src/components/shared/CustomTable.tsx +++ b/src/components/shared/CustomTable.tsx @@ -9,6 +9,9 @@ import { TableRow, Typography, } from '@mui/material'; +import { FaDiscord, FaGoogle } from 'react-icons/fa'; + +import { capitalize } from '../../utils/helper'; import AccessControlButton from './AccessControlButton'; @@ -64,8 +67,14 @@ const CustomTable: React.FC> = ({ {xcolumns.map((platform, index) => (
- {platform.provider[0].toUpperCase()} - {platform.provider} + + {platform.provider === 'discord' ? ( + + ) : ( + + )} + + {capitalize(platform.provider)}
))} diff --git a/src/pages/Identifiers/Attestation/Attestation.tsx b/src/pages/Identifiers/Attestation/Attestation.tsx index 887c96c..edfc67c 100644 --- a/src/pages/Identifiers/Attestation/Attestation.tsx +++ b/src/pages/Identifiers/Attestation/Attestation.tsx @@ -5,6 +5,7 @@ import { useParams } from 'react-router-dom'; import StepOne from '../../../components/pages/attestations/StepOne'; import StepThree from '../../../components/pages/attestations/StepThree'; import StepTwo from '../../../components/pages/attestations/StepTwo'; +import CustomBreadcrumb from '../../../components/shared/CustomBreadcrumb'; import CustomStepper from '../../../components/shared/CustomStepper'; import { Provider } from '../../../enums'; import { AttestPayload } from '../../../interfaces'; @@ -30,36 +31,46 @@ export default function Attestation() { handleNextStep(); }; + const breadcrumbs = [ + { label: 'Identifiers', href: '/identifiers' }, + { label: 'Attestation' }, + ]; + return ( - - - Link Your Social Media Accounts - Attest your social media accounts by linking them to your wallet - address. This allows you to prove ownership over these accounts. - - + <> + + + + Link Your Social Media Accounts + Attest your social media accounts by linking them to your wallet + address. This allows you to prove ownership over these accounts. + + - {activeStep === 0 && ( - - )} - {activeStep === 1 && ( - - )} - {activeStep === 2 && } - + {activeStep === 0 && ( + + )} + {activeStep === 1 && ( + + )} + {activeStep === 2 && ( + + )} + + ); }