diff --git a/src/features/events/components/EventSignUpCard.tsx b/src/features/events/components/EventSignUpCard.tsx new file mode 100644 index 0000000000..f9162d2d5e --- /dev/null +++ b/src/features/events/components/EventSignUpCard.tsx @@ -0,0 +1,64 @@ +import { FC } from 'react'; +import { + Button, + Card, + CardActions, + CardContent, + CardMedia, + Typography, + useTheme, +} from '@mui/material'; + +import { ZetkinEvent } from 'utils/types/zetkin'; + +type EventSignUpCardProps = { + event: ZetkinEvent; +}; + +const EventSignUpCard: FC = ({ event }) => { + const theme = useTheme(); + // TODO: Instead of always using the en-US .toLocaleString, update to match the user settings. + const startTime = new Date(event.start_time).toLocaleString('sv-SE', { + hour: 'numeric', + minute: 'numeric', + }); + + return ( + + + + + {event.title} + + + {startTime} - {event.location?.title} + + + {event.info_text} + + + + + + + + ); +}; + +export default EventSignUpCard; diff --git a/src/features/events/components/EventSignUpList.tsx b/src/features/events/components/EventSignUpList.tsx new file mode 100644 index 0000000000..56076b3e24 --- /dev/null +++ b/src/features/events/components/EventSignUpList.tsx @@ -0,0 +1,21 @@ +import { Box } from '@mui/material'; +import { FC } from 'react'; + +import EventSignUpCard from './EventSignUpCard'; +import { ZetkinEvent } from 'utils/types/zetkin'; + +type EventSignUpListProps = { + events: ZetkinEvent[]; +}; + +const EventSignUpList: FC = ({ events }) => { + return ( + + {events.map((event) => { + return ; + })} + + ); +}; + +export default EventSignUpList;