zustand part 3 (#2878)

* zustand part 3

* clean up

* yarn lock
This commit is contained in:
Kurt Hutten
2024-07-03 09:22:46 +10:00
committed by GitHub
parent c5150468a2
commit 4c6e8633f7
11 changed files with 81 additions and 92 deletions

View File

@ -6,14 +6,12 @@ import React, { useMemo } from 'react'
import toast from 'react-hot-toast'
import Tooltip from './Tooltip'
import { useSettingsAuthContext } from 'hooks/useSettingsAuthContext'
import { useStore } from 'useStore'
import { useAppState } from 'AppState'
export const RefreshButton = ({ children }: React.PropsWithChildren) => {
const { auth } = useSettingsAuthContext()
const token = auth?.context?.token
const { htmlRef } = useStore((s) => ({
htmlRef: s.htmlRef,
}))
const { htmlRef } = useAppState()
const coreDumpManager = useMemo(
() => new CoreDumpManager(engineCommandManager, htmlRef, token),
[]