fix core dump screenshot (#2911)
* fix core dump screenshot * make it robust
This commit is contained in:
@ -10,12 +10,10 @@ Please do not fill this up with junk.
|
||||
|
||||
interface AppState {
|
||||
isStreamReady: boolean
|
||||
htmlRef: React.RefObject<HTMLDivElement> | null
|
||||
setAppState: (newAppState: Partial<AppState>) => void
|
||||
}
|
||||
|
||||
const AppStateContext = createContext<AppState>({
|
||||
htmlRef: null,
|
||||
isStreamReady: false,
|
||||
setAppState: () => {},
|
||||
})
|
||||
@ -24,7 +22,6 @@ export const useAppState = () => useContext(AppStateContext)
|
||||
|
||||
export const AppStateProvider = ({ children }: { children: ReactNode }) => {
|
||||
const [appState, _setAppState] = useState<AppState>({
|
||||
htmlRef: null,
|
||||
isStreamReady: false,
|
||||
setAppState: () => {},
|
||||
})
|
||||
@ -34,7 +31,6 @@ export const AppStateProvider = ({ children }: { children: ReactNode }) => {
|
||||
return (
|
||||
<AppStateContext.Provider
|
||||
value={{
|
||||
htmlRef: appState.htmlRef,
|
||||
isStreamReady: appState.isStreamReady,
|
||||
setAppState,
|
||||
}}
|
||||
|
Reference in New Issue
Block a user