@@ -4,6 +4,7 @@ import useGetActiveUser from "@/app/hooks/api_access/user/useGetActiveUser";
4
4
import useGetGroupChatsInfo from "@/app/hooks/api_access/group_chats/useGetGroupChatsInfo" ;
5
5
import useGetGroupChatLeaderboards from "@/app/hooks/api_access/leaderboards/useGetGroupChatLeaderboards" ;
6
6
import useNavBar from "@/app/hooks/context_imports/useNavBar" ;
7
+ import useAdjustContentHeight from "@/app/hooks/useAdjustContentHeight" ;
7
8
import { User , GroupChatInfo , SurvivalEntry , TimeAttackEntry , QuizLeaderboardInfo } from "@/app/interfaces" ;
8
9
import { renderQuizRows , toggleModal , isTimeAttackEntry , isSurvivalEntry } from "@/app/utilities/miscFunctions" ;
9
10
import GroupChatInfoRow from "@/app/components/data-rows/GroupChatInfoRow" ;
@@ -49,6 +50,9 @@ export default function Dashboard() {
49
50
const [ selectedLeaderboardIndex , setSelectedLeaderboardIndex ] = useState < number > ( 0 ) ; // [0, previewLeaderboards.length)
50
51
const [ leaderboardAnimationStatus , setLeaderboardAnimationStatus ] = useState < LeaderboardAnimationStatus | null > ( null ) ;
51
52
53
+ // Adjust the height of the page content area
54
+ useAdjustContentHeight ( ".navbar" , ".page-content" ) ;
55
+
52
56
// ----------- Data Retrieval ---------
53
57
useEffect ( ( ) => {
54
58
const getPageData = async ( ) => {
@@ -367,8 +371,8 @@ export default function Dashboard() {
367
371
}
368
372
369
373
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" >
372
376
< div className = { `relative w-[95%] lg:w-[90%] xl:w-[80%] 2xl:w-[70%] 3xl:w-[50%]` } >
373
377
{ renderFocusedGroupChat ( ) }
374
378
< div className = "hidden lg:block" >
0 commit comments