Skip to content

Commit

Permalink
feat: add presentation event type (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaGOs92 authored Jun 4, 2024
1 parent 914707a commit 3736226
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 8 additions & 3 deletions components/events/event-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ const getEventTypeColor = (type: EventTypeTypeEnum) => {
return "rgb(209, 51, 91)";
case EventTypeTypeEnum.ADRESSE_REGION:
return "rgb(130, 0, 191)";
case EventTypeTypeEnum.PRESENTATION:
return "rgb(26, 168, 255)";
default:
return 'black';
return "black";
}
};

Expand All @@ -27,7 +29,7 @@ const getDate = (date: string) => {
};

const getHours = (startHour: string, endHour: string) => {
return `${startHour.replace(':', 'h')} à ${endHour.replace(':', 'h')}`;
return `${startHour.replace(":", "h")} à ${endHour.replace(":", "h")}`;
};

export const EventItem = ({
Expand All @@ -40,7 +42,10 @@ export const EventItem = ({
}: EventType) => (
<tr key={_id}>
<td className="fr-col fr-my-1v">
<Badge style={{background: getEventTypeColor(type), color: 'white'}} noIcon>
<Badge
style={{ background: getEventTypeColor(type), color: "white" }}
noIcon
>
{type}
</Badge>
</td>
Expand Down
1 change: 1 addition & 0 deletions types/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export enum EventTypeTypeEnum {
PARTENAIRE = "partenaire",
ADRESSE_LAB = "adresselab",
ADRESSE_REGION = "adresse-region",
PRESENTATION = "présentation",
}

export enum EventTypeTagEnum {
Expand Down

0 comments on commit 3736226

Please sign in to comment.