Skip to content

Commit

Permalink
Remove the old global state
Browse files Browse the repository at this point in the history
  • Loading branch information
CommandMC committed Jun 23, 2024
1 parent 514b3e7 commit 556962a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 37 deletions.
4 changes: 3 additions & 1 deletion src/frontend/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { useEffect } from 'react'

import './App.css'
import {
Expand Down Expand Up @@ -27,6 +27,8 @@ function Root() {
'enableNewDesign'
)

useEffect(window.api.frontendReady, [])

const hasNativeOverlayControls = navigator['windowControlsOverlay']?.visible
const showOverlayControls = isFrameless && !hasNativeOverlayControls

Expand Down
14 changes: 6 additions & 8 deletions src/frontend/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { initGamepad } from './helpers/gamepad'

import './index.scss'
import './themes.scss'
import GlobalState from './state/GlobalState'
import { initShortcuts } from './helpers/shortcuts'
import { configStore } from './helpers/electronStores'
import { initOnlineMonitor } from './helpers/onlineMonitor'
import Loading from './screens/Loading'
import './state/GlobalStateV2'

initOnlineMonitor()

Expand Down Expand Up @@ -103,13 +103,11 @@ const App = lazy(async () => import('./App'))

root.render(
// <React.StrictMode>
<GlobalState>
<I18nextProvider i18n={i18next}>
<Suspense fallback={<Loading />}>
<App />
</Suspense>
</I18nextProvider>
</GlobalState>
<I18nextProvider i18n={i18next}>
<Suspense fallback={<Loading />}>
<App />
</Suspense>
</I18nextProvider>
// </React.StrictMode>
)

Expand Down
5 changes: 0 additions & 5 deletions src/frontend/state/ContextProvider.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions src/frontend/state/GlobalState.tsx

This file was deleted.

0 comments on commit 556962a

Please sign in to comment.