So I currently have my dynamic path set to show events by id [id].js localhost:3000/event/1
however I'd like it to be: localhost:3000/city/date/title I have all these available in the events database I'm just having trouble wrapping my head around the right way to do this
[id].js
export const getStaticPaths = async () => {
const { data: events } = await supabase.from("events").select("id");
const paths = events.map(({ id }) => ({
params: {
id: id.toString(),
},
}));
return {
paths,
fallback: "blocking",
};
};
export const getStaticProps = async ({ params: { id } }) => {
const { data: events } = await supabase
.from("events")
.select("*")
.eq("id", id)
.single();
return {
props: {
events,
},
revalidate: 60,
};
};```