Commit 5edf8560 authored by Venkaiah Naidu Singamchetty's avatar Venkaiah Naidu Singamchetty

Merge branch 'apiserver' into 'master'

layout modified

See merge request !45
parents b93c0ac1 542b71ac
......@@ -13,7 +13,7 @@ function App() {
<Route path='/' element={<Home />}/>
<Route path="/dashboard" element={<Layout><Dashboard/></Layout>}/>
<Route path="/viewreportee/:id" element={<Layout><Reports/></Layout>}/>
<Route path="/*" element={<Layout><PageNotFound/></Layout>}/>
<Route path="/*" element={<PageNotFound/>}/>
</Routes>
</BrowserRouter>
);
......
......@@ -37,7 +37,7 @@ function Table({headers, data,loading, maxHeight}) {
);
else
return <div className="w-full h-full">
<p className="text-center align-middle mt-14 mb-14 text-blue-500">No records to display</p>
<p className="text-center align-middle pt-14 pb-14 text-blue-500">No records to display</p>
</div>
}
......
......@@ -3,7 +3,7 @@ import { useNavigate } from "react-router-dom";
import axios from 'axios';
import { base_url } from "../../utils/constants";
import { loginUser } from "../../redux/reducers/userSlice";
import {useDispatch} from 'react-redux'
import {useDispatch,useSelector} from 'react-redux'
import Loading from '../../components/loading Component/Loading'
function Home() {
......@@ -12,6 +12,7 @@ function Home() {
const [id, setId] = useState(null);
const [errorMsg,setErrorMsg]=useState("")
const [loading,setLoading]=useState(true)
const userDetails = useSelector((state) => state.userDetails);
const handleNavigate = async () => {
......@@ -36,6 +37,12 @@ function Home() {
useEffect(()=>{
setLoading(false)
},[])
useEffect(()=>{
if (userDetails?.user!=null)
navigate("/dashboard")
else
navigate("/")
},[userDetails])
return (
<div className="container py-10 px-10 mx-0 min-w-full h-screen flex items-center justify-center bg-blue-100 ">
......
......@@ -2,8 +2,8 @@ import React, { memo } from 'react';
const PageNotFound = memo(() => {
return (
<div className="w-full h-full">
<p className="text-center align-middle mt-14 mb-14 text-red-500">Page Not Found</p>
<div className="w-full h-full ">
<p className="text-center align-middle pt-14 pb-14 text-red-500 text-3xl font-bold">Page Not Found</p>
</div>
);
});
......
......@@ -152,7 +152,7 @@ return (
);
else
return <div className="w-full h-full">
<p className="text-center align-middle mt-14 mb-14 text-blue-500">The Employee data you are trying to access <br/> is not under you reportees so data is hidden.</p>
<p className="text-center align-middle pt-14 pb-14 text-blue-500">The Employee data you are trying to access <br/> is not under you reportees so data is hidden.</p>
</div>
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment