Skip to content

Commit

Permalink
Merge pull request #189 from sametcodes/develop
Browse files Browse the repository at this point in the history
Develop: static params for build lists
  • Loading branch information
sametcodes authored Apr 26, 2023
2 parents 516a182 + ccc0bd4 commit 9bce9fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/build/[...ids]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
export const dynamic = "force-static";

export async function generateStaticParams() {
const queries = await prisma.platformQuery.findMany({ select: { id: true } });
return queries.map((query) => ({ ids: [query.id] }));
}

import { getServerSession } from "next-auth/next";
import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { validations } from "@/platforms";
Expand Down
2 changes: 2 additions & 0 deletions app/build/list/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export const dynamic = "force-static";

import prisma from "@/services/prisma";
import { Platform, PlatformCode, PlatformQuery } from "@prisma/client";
import { templates, samples } from "@/platforms";
Expand Down

1 comment on commit 9bce9fe

@vercel
Copy link

@vercel vercel bot commented on 9bce9fe Apr 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

readmerocks – ./

readmerocks-sametcodes.vercel.app
readmerocks-git-main-sametcodes.vercel.app
readme.rocks
www.readme.rocks

Please sign in to comment.