fix: adjust layout styles for better responsiveness
This commit is contained in:
parent
cbac9c5464
commit
a125e37f8e
2 changed files with 13 additions and 6 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue