fix: add class bodyMain to root element
All checks were successful
Release to Staging / build_and_release (push) Successful in 41s

This commit is contained in:
daniyal 2024-08-14 15:17:37 +05:00
parent 36f9f976ac
commit c978c50168
2 changed files with 34 additions and 0 deletions

View File

@ -1,8 +1,27 @@
import { Route, Routes } from 'react-router-dom' import { Route, Routes } from 'react-router-dom'
import { Layout } from './layout' import { Layout } from './layout'
import { routes } from './routes' import { routes } from './routes'
import { useEffect } from 'react'
import './styles/styles.css'
function App() { 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 ( return (
<Routes> <Routes>
<Route element={<Layout />}> <Route element={<Layout />}>

View File

@ -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 { .ContainerMain {
max-width: 1400px; max-width: 1400px;
width: 100%; width: 100%;