diff --git a/app/[legislature]/dossier/[id]/debat/DebateFilterBar.tsx b/app/[legislature]/dossier/[id]/debat/DebateFilterBar.tsx index 7d77fc7..0dfdee8 100644 --- a/app/[legislature]/dossier/[id]/debat/DebateFilterBar.tsx +++ b/app/[legislature]/dossier/[id]/debat/DebateFilterBar.tsx @@ -15,18 +15,8 @@ import Typography from "@mui/material/Typography"; import ArrowBackIcon from "@mui/icons-material/ArrowBack"; import ArrowForwardIcon from "@mui/icons-material/ArrowForward"; import { Agenda } from "@prisma/client"; -import Button from "@mui/material/Button"; -import Menu from "@mui/material/Menu"; import Link from "next/link"; -type Debat = { - uid: string; - libelleCourtLieu: string | null; - libelleLongLieu: string | null; - timestampDebut: Date; - compteRenduRef: string; -}; - type DebateFilterBarProps = { reunions: Pick< Agenda, @@ -35,7 +25,7 @@ type DebateFilterBarProps = { | "libelleLongLieu" | "timestampDebut" | "timestampFin" - | "compteRenduRef" + | "compteRenduRefUid" >[]; // setDebateRef: (newRef: string) => void; // debats: Debat[]; @@ -46,14 +36,14 @@ export const DebateFilterBar = (props: DebateFilterBarProps) => { const sceanceUid = useSelectedLayoutSegment(); const reunionIndex = reunions.findIndex( - (reunion) => reunion.compteRenduRef === sceanceUid + (reunion) => reunion.compteRenduRefUid === sceanceUid ); if (!sceanceUid || reunionIndex < 0) { if (reunions.length > 0) { if (sceanceUid) { - permanentRedirect(`${reunions[0].compteRenduRef}`); + permanentRedirect(`${reunions[0].compteRenduRefUid}`); } else { - permanentRedirect(`debat/${reunions[0].compteRenduRef}`); + permanentRedirect(`debat/${reunions[0].compteRenduRefUid}`); } } } @@ -86,7 +76,7 @@ export const DebateFilterBar = (props: DebateFilterBarProps) => {