fix core dump screenshot (#2911)

* fix core dump screenshot

* make it robust
This commit is contained in:
Kurt Hutten
2024-07-04 15:58:29 +10:00
committed by GitHub
parent 6370d45f94
commit 0dfee64e3b
7 changed files with 18 additions and 44 deletions

View File

@ -40,7 +40,7 @@ import useHotkeyWrapper from 'lib/hotkeyWrapper'
import toast from 'react-hot-toast'
import { coreDump } from 'lang/wasm'
import { useMemo } from 'react'
import { AppStateProvider, useAppState } from 'AppState'
import { AppStateProvider } from 'AppState'
const router = createBrowserRouter([
{
@ -180,9 +180,8 @@ export const Router = () => {
function CoreDump() {
const { auth } = useSettingsAuthContext()
const token = auth?.context?.token
const { htmlRef } = useAppState()
const coreDumpManager = useMemo(
() => new CoreDumpManager(engineCommandManager, htmlRef, token),
() => new CoreDumpManager(engineCommandManager, token),
[]
)
useHotkeyWrapper(['meta + shift + .'], () => {