Skip to content

Commit

Permalink
page titles for buildingfab docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisfarms committed Nov 2, 2023
1 parent 6b34448 commit 7278f74
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/src/pages/building-fabricator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { Manifest, BuildingKindFactorySpec, parseManifestDocuments } from '@down
import { ItemFragment } from '@downstream/core/src/gql/graphql';
import { saveAs } from 'file-saver';
import JSZip from 'jszip';
import Head from 'next/head';
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import styled from 'styled-components';
import YAML from 'yaml';
Expand Down Expand Up @@ -1505,6 +1506,9 @@ export default function ShellPage() {
<GameStateProvider config={config}>
<SessionProvider>
<InventoryProvider>
<Head>
<title>Downstream: Building Fabricator</title>
</Head>
<div style={{ margin: '1rem' }}>
<NavPanel />
</div>
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/pages/docs/[[...slug]].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { useConfig } from '@app/hooks/use-config';
import { GameStateProvider } from '@app/hooks/use-game-state';
import { SessionProvider } from '@app/hooks/use-session';
import { useRouter } from 'next/router';
import Head from 'next/head';

const DOCS_CONTENT_DIR = '../docs';

Expand Down Expand Up @@ -216,10 +217,14 @@ export default function Page({ doc, tree }: InferGetStaticPropsType<typeof getSt
if (!doc) {
return <ErrorPage statusCode={404} />;
}
const title = doc.title || doc.slug.slice(-1).find(() => true) || '';
return (
<WalletProviderProvider wallets={config?.wallets || {}}>
<GameStateProvider config={config}>
<SessionProvider>
<Head>
<title>Downstream: {title}</title>
</Head>
<div style={{ display: 'flex', flexDirection: 'row' }}>
<div style={{}}>
<div
Expand Down

0 comments on commit 7278f74

Please sign in to comment.