Skip to content

Commit

Permalink
sort singups by created at
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelSiidorow committed Jan 27, 2024
1 parent 9920ef0 commit d829624
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions web/app/[locale]/signups/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { fetchAPI } from "@/lib/api";
import GoBack from "./GoBack";
import { ItemCategory, StrapiBaseType } from "@/utils/models";
import { getTranslation } from "@/utils/translationHelper";
import GoBack from "./GoBack";
export const dynamic = "force-dynamic";

type Field = StrapiBaseType<{
Expand All @@ -14,7 +14,13 @@ type Field = StrapiBaseType<{

const getData = async () => {
const [content, categories] = await Promise.all([
fetchAPI<Field[]>("/orders/signups", { cache: "no-store" }),
fetchAPI<Field[]>(
"/orders/signups",
{ cache: "no-store" },
{
sort: ["createdAt:asc"],
},
),
fetchAPI<ItemCategory[]>(
"/item-categories",
{ cache: "no-store" },
Expand Down

0 comments on commit d829624

Please sign in to comment.