Skip to content

Commit

Permalink
fix sizing and order
Browse files Browse the repository at this point in the history
  • Loading branch information
afroborg committed Jan 11, 2024
1 parent 9c72348 commit 72fa01c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion web/src/components/layout/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const YearNotFound: React.FC<IndexPropsNotFound> = ({
<a
href={`https://${year.year}.nollning.esek.se`}
key={year.year}
className="flex flex-col items-center justify-center gap-4 rounded-md border-2 p-4"
className="flex flex-col items-center justify-center gap-4 rounded-md border-2 p-4 w-[200px] h-full"
style={{
backgroundColor: year.colors.primary,
borderColor: year.colors.accent,
Expand Down
8 changes: 4 additions & 4 deletions web/src/lib/years.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { getAsync } from './axios';
const getCurrentYear = async (
year: string,
password: string,
locale: string
locale: string,
): Promise<IndexPropsFound | null> => {
// fetches the year data from strapi
const resp = await getAsync<Year>(`/years/${year}?password=${password}`, {
Expand All @@ -37,7 +37,7 @@ const getCurrentYear = async (
};

const getPreviousYears = async (
locale: string
locale: string,
): Promise<IndexPropsNotFound> => {
const isSwe = locale === 'sv';
const title = isSwe ? 'Nollningsåret hittades inte' : 'Year not found';
Expand All @@ -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<IndexProps> => {
const currentYear = await getCurrentYear(year, password, locale);

Expand Down

0 comments on commit 72fa01c

Please sign in to comment.