get value that depends on being run in the client in an effect

This commit is contained in:
Corwin 2024-04-20 13:43:42 +01:00
parent bc689cbbd2
commit 103085684a
No known key found for this signature in database

View file

@ -1,6 +1,6 @@
"use client";
import { useState } from "react";
import { useEffect, useState } from "react";
import { ContentBlock } from "../contentBlock";
import { GameDeveloperSummary } from "./gameDeveloperSummary";
@ -8,7 +8,10 @@ import { styled } from "styled-components";
import { Debug } from "./debug";
export function BacktracePage() {
const [backtrace, setBacktrace] = useState(getBacktrace);
const [backtrace, setBacktrace] = useState("");
useEffect(() => {
setBacktrace(getBacktrace());
}, []);
return (
<ContentBlock>