Put the game developer summary in a details block

This commit is contained in:
Gwilym Inzani 2024-04-20 12:38:44 +01:00
parent dcdbf1069e
commit 7bbb52c449
2 changed files with 24 additions and 7 deletions

View file

@ -3,6 +3,7 @@
import { useState } from 'react';
import { ContentBlock } from "../contentBlock";
import { GameDeveloperSummary } from './gameDeveloperSummary';
import { styled } from "styled-components";
import { Debug } from "./debug";
@ -32,13 +33,7 @@ export function BacktracePage() {
</p>
<h2>Backtrace</h2>
{backtrace && <Debug encodedBacktrace={backtrace} />}
<h2>For game developers</h2>
<p>If you don&apos;t want players to be sent to this page, you can:</p>
<ol>
<li>Configure the backtrace page to point to your own site</li>
<li>Configure the backtrace page to not point to a site at all</li>
<li>Not use the backtrace feature</li>
</ol>
<GameDeveloperSummary />
</ContentBlock>
);
}
@ -76,6 +71,7 @@ const BacktraceCopyButton = styled.button`
padding: 10px;
`;
function getBacktrace() {
return window.location.hash.slice(1);
}

View file

@ -0,0 +1,21 @@
import { styled } from "styled-components";
export const GameDeveloperSummary = () => {
return <Details>
<Summary>For game developers</Summary>
<p>If you don&apos;t want players to be sent to this page, you can:</p>
<ol>
<li>Configure the backtrace page to point to your own site</li>
<li>Configure the backtrace page to not point to a site at all</li>
<li>Not use the backtrace feature</li>
</ol>
</Details>
}
const Details = styled.details`
margin-top: 10px;
`;
const Summary = styled.summary`
font-weight: bold;
`;