remove getstaticparams from app icons
This commit is contained in:
@@ -1,22 +1,12 @@
|
|||||||
import { IconDetails } from "@/components/icon-details"
|
import { IconDetails } from "@/components/icon-details"
|
||||||
import { BASE_URL, WEB_URL } from "@/constants"
|
import { BASE_URL, WEB_URL } from "@/constants"
|
||||||
import { getAllIcons, getAuthorData } from "@/lib/api"
|
import { getAllIcons, getAuthorData } from "@/lib/api"
|
||||||
import { formatIconName } from "@/lib/utils"
|
|
||||||
import type { Metadata, ResolvingMetadata } from "next"
|
import type { Metadata, ResolvingMetadata } from "next"
|
||||||
import { default as dynamicImport } from "next/dynamic"
|
|
||||||
import { notFound } from "next/navigation"
|
import { notFound } from "next/navigation"
|
||||||
export const dynamicParams = false
|
export const dynamicParams = false
|
||||||
|
|
||||||
export async function generateStaticParams() {
|
export async function generateStaticParams() {
|
||||||
const iconsData = await getAllIcons()
|
const iconsData = await getAllIcons()
|
||||||
if (process.env.CI_MODE === "false") {
|
|
||||||
// This is meant to speed up the build process in local development
|
|
||||||
return Object.keys(iconsData)
|
|
||||||
.slice(0, 5)
|
|
||||||
.map((icon) => ({
|
|
||||||
icon,
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
return Object.keys(iconsData).map((icon) => ({
|
return Object.keys(iconsData).map((icon) => ({
|
||||||
icon,
|
icon,
|
||||||
}))
|
}))
|
||||||
|
|||||||
Reference in New Issue
Block a user