fix: adjust layout styles for better responsiveness

This commit is contained in:
codytseng
2025-08-30 23:04:55 +08:00
parent cbac9c5464
commit a125e37f8e
2 changed files with 13 additions and 6 deletions

View File

@@ -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>