Skip to content

Commit

Permalink
Merge pull request #856 from playmint/pagetitles
Browse files Browse the repository at this point in the history
page titles for buildingfab docs
  • Loading branch information
5p0rt5BEArD authored Nov 3, 2023
2 parents fef57df + 7278f74 commit 3a0e14b
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 @@ -1539,6 +1540,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 @@ -17,6 +17,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 @@ -219,10 +220,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 3a0e14b

Please sign in to comment.