fix(next) : allow blocking routes without loading fallbacks
This commit is contained in:
@@ -7,6 +7,8 @@ import { getCachedPublicGuide } from "@/lib/cache/public";
|
|||||||
|
|
||||||
type Params = Promise<{ character: string; page: string }>;
|
type Params = Promise<{ character: string; page: string }>;
|
||||||
|
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export async function generateMetadata({ params }: { params: Params }): Promise<Metadata> {
|
export async function generateMetadata({ params }: { params: Params }): Promise<Metadata> {
|
||||||
await connection();
|
await connection();
|
||||||
const { character } = await params;
|
const { character } = await params;
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import { getCachedPublicGuide } from "@/lib/cache/public";
|
|||||||
|
|
||||||
type Params = Promise<{ character: string }>;
|
type Params = Promise<{ character: string }>;
|
||||||
|
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export async function generateMetadata({
|
export async function generateMetadata({
|
||||||
params,
|
params,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ export const metadata: Metadata = {
|
|||||||
description: "ไกด์ตัวละครจากช่องเกนชินไม่ใช่เกมมือถือ",
|
description: "ไกด์ตัวละครจากช่องเกนชินไม่ใช่เกมมือถือ",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default function RootLayout({ children }: LayoutProps<"/">) {
|
export default function RootLayout({ children }: LayoutProps<"/">) {
|
||||||
const deploymentId = process.env.NEXT_DEPLOYMENT_ID?.trim() || "development";
|
const deploymentId = process.env.NEXT_DEPLOYMENT_ID?.trim() || "development";
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import { StructuredDirectory } from "@/components/public/structured-directory";
|
|||||||
import { SiteHeader } from "@/components/public/site-header";
|
import { SiteHeader } from "@/components/public/site-header";
|
||||||
import { getCachedPublicGuideCards } from "@/lib/cache/public";
|
import { getCachedPublicGuideCards } from "@/lib/cache/public";
|
||||||
|
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function HomePage() {
|
export default async function HomePage() {
|
||||||
await connection();
|
await connection();
|
||||||
const guides = await getCachedPublicGuideCards();
|
const guides = await getCachedPublicGuideCards();
|
||||||
|
|||||||
Reference in New Issue
Block a user