import { Typography } from '@mui/material'; import { useAtomValue } from 'jotai'; import { isEmpty } from 'ramda'; import { useTranslation } from 'react-i18next'; import { type SelectEntry, Subtitle } from '../../../..'; import { List as UIList } from '../../../List'; import { valuesAtom } from '../atoms'; import type { Labels } from '../models'; import Item from './Item'; import { useListStyles } from './List.styles'; interface Props { labels: Labels['list']; roles: Array; } const List = ({ labels, roles }: Props): JSX.Element => { const { t } = useTranslation(); const { classes } = useListStyles(); const values = useAtomValue(valuesAtom); return (
{t(labels.title)}
{isEmpty(values) ? ( {t(labels.empty)} ) : ( {values.map(({ id, ...rest }, index) => ( ))} )}
); }; export default List;