fix: adjust layout styles for better responsiveness
This commit is contained in:
@@ -8,6 +8,13 @@ import { createRoot } from 'react-dom/client'
|
||||
import App from './App.tsx'
|
||||
import { ErrorBoundary } from './components/ErrorBoundary.tsx'
|
||||
|
||||
const setVh = () => {
|
||||
document.documentElement.style.setProperty('--vh', `${window.innerHeight}px`)
|
||||
}
|
||||
window.addEventListener('resize', setVh)
|
||||
window.addEventListener('orientationchange', setVh)
|
||||
setVh()
|
||||
|
||||
createRoot(document.getElementById('root')!).render(
|
||||
<StrictMode>
|
||||
<ErrorBoundary>
|
||||
|
||||
Reference in New Issue
Block a user