first version which seems to run
This commit is contained in:
@@ -3,7 +3,7 @@ import AdminLink from "@/components/ui/admin-link";
|
||||
import { TailwindIndicator } from "@/components/ui/tailwind-indicator";
|
||||
import { ThemeSelector } from "@/components/ui/theme-selector";
|
||||
import settings from "@/content/settings/config.json";
|
||||
import client from "@/tina/__generated__/client";
|
||||
import client from "@/tina/__generated__/databaseClient";
|
||||
import { GoogleTagManager } from "@next/third-parties/google";
|
||||
import { ThemeProvider } from "next-themes";
|
||||
import { Inter, Roboto_Flex } from "next/font/google";
|
||||
@@ -12,6 +12,10 @@ import { TabsLayout } from "@/components/docs/layout/tab-layout";
|
||||
import type React from "react";
|
||||
import { TinaClient } from "./tina-client";
|
||||
|
||||
// Force all pages to be server-rendered (not statically generated at build time)
|
||||
// Required because databaseClient needs a running database connection
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
const isDev = process.env.NODE_ENV === "development";
|
||||
|
||||
const body = Inter({ subsets: ["latin"], variable: "--body-font" });
|
||||
@@ -76,9 +80,13 @@ const Content = ({ children }: { children?: React.ReactNode }) => (
|
||||
const DocsMenu = async ({ children }: { children?: React.ReactNode }) => {
|
||||
// Fetch navigation data that will be shared across all docs pages
|
||||
|
||||
const navigationData = await client.queries.minimisedNavigationBarFetch({
|
||||
relativePath: "docs-navigation-bar.json",
|
||||
});
|
||||
const navigationData = JSON.parse(
|
||||
JSON.stringify(
|
||||
await client.queries.minimisedNavigationBarFetch({
|
||||
relativePath: "docs-navigation-bar.json",
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="relative flex flex-col w-full pb-2">
|
||||
|
||||
Reference in New Issue
Block a user