Commit 7b657fe2 authored by Shiva Komirishetti's avatar Shiva Komirishetti

max height changes

parent 28d6db83
...@@ -46,7 +46,7 @@ function Accordion({ title, data ,handleAddActivity,open,handleAccordian}) { ...@@ -46,7 +46,7 @@ function Accordion({ title, data ,handleAddActivity,open,handleAccordian}) {
{ title: "Score", id: "score", render: (value) => <div className="w-[35px] px-3 bg-blue-400 rounded-full text-white font-bold text-center p-[4px]">{value}</div> }, { title: "Score", id: "score", render: (value) => <div className="w-[35px] px-3 bg-blue-400 rounded-full text-white font-bold text-center p-[4px]">{value}</div> },
{ title: "Comments", id: "comments", render:(value)=><span className="listData" title={value}>{value}</span>}, { title: "Comments", id: "comments", render:(value)=><span className="listData" title={value}>{value}</span>},
]; ];
if(loading && title =="Duties")return <Loading/> if(loading && title =="Duties")return <Loading/>
if(!loading){ if(!loading){
......
...@@ -37,7 +37,7 @@ function Header({ isOpen }) { ...@@ -37,7 +37,7 @@ function Header({ isOpen }) {
}, []); }, []);
return ( return (
<div className="flex items-center justify-between py-5 px-10" > <div className="flex items-center justify-between py-5 px-10 fixed bg-white w-full" >
<Link to={"/dashboard"}><img src="/logo.png" /></Link> <Link to={"/dashboard"}><img src="/logo.png" /></Link>
<div className="flex items-center relative"> <div className="flex items-center relative">
<button ref={logoutRef} className=" -mt-1 text-2xl flex" onClick={() => setOpen(!open)}> <button ref={logoutRef} className=" -mt-1 text-2xl flex" onClick={() => setOpen(!open)}>
......
import React from "react"; import React from "react";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { useSelector } from "react-redux"; import SetWindowSize from '../../utils/SetWindowSize';
function Sidebar() { function Sidebar() {
const user = useSelector((state) => state.userDetails.user); const [windowWidth, windowHeight] = SetWindowSize();
return ( return (
<div className="w-[20%] flex items-center flex-col"> <div className="w-[20%] flex items-center flex-col overflow-auto" style={{ height: `calc(${windowHeight}px - 87px)` }}>
<nav <nav
className="hs-accordion-group p-6 w-full flex flex-col flex-wrap" className="hs-accordion-group p-6 w-full flex flex-col flex-wrap"
data-hs-accordion-always-open data-hs-accordion-always-open
......
...@@ -23,6 +23,3 @@ code { ...@@ -23,6 +23,3 @@ code {
display: inline-block; display: inline-block;
} }
.childDiv {
max-height: calc(100vh - 85px);
}
...@@ -2,9 +2,12 @@ import React, { useState } from 'react' ...@@ -2,9 +2,12 @@ import React, { useState } from 'react'
import Header from '../../components/header'; import Header from '../../components/header';
import Sidebar from '../../components/sidebar'; import Sidebar from '../../components/sidebar';
import LeftSidebar from '../../components/leftSidebar'; import LeftSidebar from '../../components/leftSidebar';
import SetWindowSize from '../../utils/SetWindowSize';
function Layout({children}) { function Layout({children}) {
const [isOpen, setIsOpen] = useState(false) const [isOpen, setIsOpen] = useState(false);
const [windowWidth, windowHeight] = SetWindowSize();
const handleLogoutOpen=()=>{ const handleLogoutOpen=()=>{
setIsOpen(false) setIsOpen(false)
} }
...@@ -12,9 +15,9 @@ function Layout({children}) { ...@@ -12,9 +15,9 @@ function Layout({children}) {
return ( return (
<div className='max-h-[84vh]' onClick={handleLogoutOpen}> <div className='max-h-[84vh]' onClick={handleLogoutOpen}>
<Header isOpen={isOpen} /> <Header isOpen={isOpen} />
<div className="flex"> <div className="flex pt-[85px]">
<Sidebar/> <Sidebar/>
<div className="bg-[#E9EDEE] w-full" style={{height:"88vh"}}> <div className="bg-[#E9EDEE] w-full overflow-auto" style={{ height: `calc(${windowHeight}px - 87px)` }}>
{children} {children}
</div> </div>
{url.includes('/viewreportee') && <LeftSidebar/>} {url.includes('/viewreportee') && <LeftSidebar/>}
......
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