mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
get value that depends on being run in the client in an effect
This commit is contained in:
parent
bc689cbbd2
commit
103085684a
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue