Automatically load latest News/Events in Carousel component
Currently, on the homepage, we're manually selecting all the posts that are supposed to be shown. E.g. it looks like this:
<Carousel
title="Events"
fluidToTheRight={true}
paths={[
"de/network/events/tfom23",
"de/network/events/buildworkshops",
"de/network/events/codeweek2022",
"de/network/events/fabfriday",
]}
/>
Instead of adding the news/events maually, we want to add them automatically (sorted by the order
prop of the individual news/events). So afterwards the component usage should look something like this:
<Carousel
title="Events"
fluidToTheRight={true}
type="events"
ascending
limit={10}
/>
- Add a
type
prop to load either events or news - Add an optional boolean prop
ascending
to sort in ascending order (default would be descending) - Add a
limit
prop to limit the amount of cards shown on the home page