@@ -4,6 +4,7 @@ import useGetActiveUser from "@/app/hooks/api_access/user/useGetActiveUser";
44import useGetGroupChatsInfo from "@/app/hooks/api_access/group_chats/useGetGroupChatsInfo" ;
55import useGetGroupChatLeaderboards from "@/app/hooks/api_access/leaderboards/useGetGroupChatLeaderboards" ;
66import useNavBar from "@/app/hooks/context_imports/useNavBar" ;
7+ import useAdjustContentHeight from "@/app/hooks/useAdjustContentHeight" ;
78import { User , GroupChatInfo , SurvivalEntry , TimeAttackEntry , QuizLeaderboardInfo } from "@/app/interfaces" ;
89import { renderQuizRows , toggleModal , isTimeAttackEntry , isSurvivalEntry } from "@/app/utilities/miscFunctions" ;
910import GroupChatInfoRow from "@/app/components/data-rows/GroupChatInfoRow" ;
@@ -49,6 +50,9 @@ export default function Dashboard() {
4950 const [ selectedLeaderboardIndex , setSelectedLeaderboardIndex ] = useState < number > ( 0 ) ; // [0, previewLeaderboards.length)
5051 const [ leaderboardAnimationStatus , setLeaderboardAnimationStatus ] = useState < LeaderboardAnimationStatus | null > ( null ) ;
5152
53+ // Adjust the height of the page content area
54+ useAdjustContentHeight ( ".navbar" , ".page-content" ) ;
55+
5256 // ----------- Data Retrieval ---------
5357 useEffect ( ( ) => {
5458 const getPageData = async ( ) => {
@@ -367,8 +371,8 @@ export default function Dashboard() {
367371 }
368372
369373 return ( < >
370- < div className = "w-full h-navbar" /> { /* Navbar spacer */ }
371- < main className = "flex max-h-content overflow-y-scroll flex-col items-center justify-between" >
374+ < div className = "navbar h-navbar w-full " /> { /* Navbar spacer */ }
375+ < main className = "page-content flex flex-col overflow-y-scroll items-center justify-between" >
372376 < div className = { `relative w-[95%] lg:w-[90%] xl:w-[80%] 2xl:w-[70%] 3xl:w-[50%]` } >
373377 { renderFocusedGroupChat ( ) }
374378 < div className = "hidden lg:block" >
0 commit comments