This one is not that much of a breaking code, nevertheless, I just wanted to point it out. When there is no sorting preferences are selected, the sortBy has a defaultValue of startDate-asc, which is wrong because startDate-asc was not one of the options values associated with the sorting. i changed it to name-asc, as it is the first and default value of the options, so logically it made sense.
Feedbacks would be appreciated if I'm right or I'm not seeing some things.
const sortBy = searchParams.get("sortBy") || "startDate-asc";
This one is not that much of a breaking code, nevertheless, I just wanted to point it out. When there is no sorting preferences are selected, the sortBy has a defaultValue of
startDate-asc
, which is wrong becausestartDate-asc
was not one of the options values associated with the sorting. i changed it toname-asc
, as it is the first and default value of the options, so logically it made sense.Feedbacks would be appreciated if I'm right or I'm not seeing some things.