diff --git a/web/src/components/layout/not-found.tsx b/web/src/components/layout/not-found.tsx index 1ea4ff2..beaa47b 100644 --- a/web/src/components/layout/not-found.tsx +++ b/web/src/components/layout/not-found.tsx @@ -31,7 +31,7 @@ const YearNotFound: React.FC = ({ => { // fetches the year data from strapi const resp = await getAsync(`/years/${year}?password=${password}`, { @@ -37,7 +37,7 @@ const getCurrentYear = async ( }; const getPreviousYears = async ( - locale: string + locale: string, ): Promise => { const isSwe = locale === 'sv'; const title = isSwe ? 'Nollningsåret hittades inte' : 'Year not found'; @@ -49,14 +49,14 @@ const getPreviousYears = async ( title, description, found: false, - years: resp, + years: resp.toSorted((a, b) => Number(b.year) - Number(a.year)), }; }; export const getYearData = async ( year: string, password: string, - locale: string + locale: string, ): Promise => { const currentYear = await getCurrentYear(year, password, locale);