Move the field guide into the docs section
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 10m22s
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 10m22s
This commit is contained in:
@@ -5,6 +5,7 @@ import { Header, Footer } from "@/components/Shell";
|
||||
import guides from "@/shared/player-docs.json";
|
||||
import styles from "./page.module.css";
|
||||
import { getI18n } from "@/lib/i18n";
|
||||
import { PlayerGuide } from "@/components/PlayerGuide";
|
||||
|
||||
export const metadata = { title: "Player docs" };
|
||||
|
||||
@@ -80,7 +81,13 @@ export default async function Docs({
|
||||
const { page = "welcome" } = await searchParams;
|
||||
const { locale } = await getI18n();
|
||||
const pages = [
|
||||
...guides,
|
||||
guides[0],
|
||||
{
|
||||
slug: "guide",
|
||||
title: locale === "ru" ? "Руководство" : "Field guide",
|
||||
markdown: "",
|
||||
},
|
||||
...guides.slice(1),
|
||||
{
|
||||
slug: "developer-api",
|
||||
title: locale === "ru" ? "API для разработчиков" : "Developer API",
|
||||
@@ -93,7 +100,11 @@ export default async function Docs({
|
||||
return (
|
||||
<>
|
||||
<Header />
|
||||
<main className={`section page-content ${styles.layout}`} id="main-content" tabIndex={-1}>
|
||||
<main
|
||||
className={`section page-content ${styles.layout}`}
|
||||
id="main-content"
|
||||
tabIndex={-1}
|
||||
>
|
||||
<aside>
|
||||
<h2>Player docs</h2>
|
||||
<nav aria-label="Documentation pages" className={styles.menu}>
|
||||
@@ -109,7 +120,9 @@ export default async function Docs({
|
||||
</nav>
|
||||
</aside>
|
||||
<article className={`prose ${styles.article}`}>
|
||||
{page === "developer-api" ? (
|
||||
{page === "guide" ? (
|
||||
<PlayerGuide />
|
||||
) : page === "developer-api" ? (
|
||||
<DeveloperDocumentation locale={locale} />
|
||||
) : (
|
||||
content(guide.markdown)
|
||||
|
||||
Reference in New Issue
Block a user