fix: add class bodyMain to root element
All checks were successful
Release to Staging / build_and_release (push) Successful in 41s
All checks were successful
Release to Staging / build_and_release (push) Successful in 41s
This commit is contained in:
parent
36f9f976ac
commit
c978c50168
19
src/App.tsx
19
src/App.tsx
@ -1,8 +1,27 @@
|
||||
import { Route, Routes } from 'react-router-dom'
|
||||
import { Layout } from './layout'
|
||||
import { routes } from './routes'
|
||||
import { useEffect } from 'react'
|
||||
import './styles/styles.css'
|
||||
|
||||
function App() {
|
||||
useEffect(() => {
|
||||
// Find the element with id 'root'
|
||||
const rootElement = document.getElementById('root')
|
||||
|
||||
if (rootElement) {
|
||||
// Add the class to the element
|
||||
rootElement.classList.add('bodyMain')
|
||||
}
|
||||
|
||||
// Cleanup function (optional): Remove the class when the component unmounts
|
||||
return () => {
|
||||
if (rootElement) {
|
||||
rootElement.classList.remove('bodyMain')
|
||||
}
|
||||
}
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<Routes>
|
||||
<Route element={<Layout />}>
|
||||
|
@ -1,3 +1,18 @@
|
||||
.bodyMain {
|
||||
background: unset;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
flex-grow: 1;
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
letter-spacing: 1px;
|
||||
font-size: 16px;
|
||||
line-height: 25px;
|
||||
word-break: break-word;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.ContainerMain {
|
||||
max-width: 1400px;
|
||||
width: 100%;
|
||||
|
Loading…
Reference in New Issue
Block a user