Skip to content

Commit

Permalink
Fix/custom table (#69)
Browse files Browse the repository at this point in the history
* implement breadcrumb

* fix xColumns
  • Loading branch information
mehdi-torabiv authored Sep 2, 2024
1 parent 85f17be commit 2d2e97d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/components/shared/CustomTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -64,8 +67,14 @@ const CustomTable: React.FC<CustomTableProps<AccessData>> = ({
{xcolumns.map((platform, index) => (
<TableCell key={index} align="center" sx={{ padding: 1 }}>
<div className="flex flex-row space-x-1.5 items-center justify-center">
<Avatar>{platform.provider[0].toUpperCase()}</Avatar>
<Typography>{platform.provider}</Typography>
<Avatar>
{platform.provider === 'discord' ? (
<FaDiscord size={24} />
) : (
<FaGoogle size={24} />
)}
</Avatar>
<Typography>{capitalize(platform.provider)}</Typography>
</div>
</TableCell>
))}
Expand Down

0 comments on commit 2d2e97d

Please sign in to comment.