merge auto-screen size for the wallet
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { useContext } from 'react'
|
||||
import React, { useContext, useEffect, useLayoutEffect } from 'react'
|
||||
import ReactDOM from 'react-dom'
|
||||
import { ErrorBoundary } from 'react-error-boundary'
|
||||
import { BrowserRouter as Router } from 'react-router-dom'
|
||||
@@ -10,9 +10,15 @@ import { Admin, Welcome } from './pages'
|
||||
import { ErrorFallback } from './components'
|
||||
import { NymWalletTheme, WelcomeTheme } from './theme'
|
||||
import { Settings } from './pages'
|
||||
import { maximizeWindow } from './utils'
|
||||
|
||||
const App = () => {
|
||||
const { clientDetails } = useContext(ClientContext)
|
||||
|
||||
useLayoutEffect(() => {
|
||||
maximizeWindow()
|
||||
}, [])
|
||||
|
||||
return !clientDetails ? (
|
||||
<WelcomeTheme>
|
||||
<Welcome />
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { invoke } from '@tauri-apps/api'
|
||||
import { appWindow } from '@tauri-apps/api/window'
|
||||
import bs58 from 'bs58'
|
||||
import { minor, valid } from 'semver'
|
||||
import { userBalance, majorToMinor, getGasFee } from '../requests'
|
||||
@@ -132,3 +133,7 @@ export const splice = (start: number, deleteCount: number, address?: string) =>
|
||||
return array.join('')
|
||||
}
|
||||
}
|
||||
|
||||
export const maximizeWindow = async () => {
|
||||
await appWindow.maximize()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user