File tree Expand file tree Collapse file tree 6 files changed +15
-24
lines changed
Expand file tree Collapse file tree 6 files changed +15
-24
lines changed Original file line number Diff line number Diff line change 1- version : " 3.8"
2-
31services :
42 redis-server :
53 image : redis:latest
Original file line number Diff line number Diff line change 1- version : " 3.8"
2-
31services :
42 redis-server :
53 image : redis:latest
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import Navbar from '@/components/navbar/Navbar' ;
3+
4+ const MatchLayout : React . FC < { children : React . ReactNode } > = ( { children } ) => {
5+ return (
6+ < >
7+ < Navbar />
8+ < main > { children } </ main >
9+ </ >
10+ ) ;
11+ } ;
12+
13+ export default MatchLayout ;
Original file line number Diff line number Diff line change 22
33import { useState , useEffect } from 'react' ;
44import { useRouter } from 'next/navigation' ;
5- import { User , Code } from 'lucide-react' ;
65import { Button } from '@/components/ui/button' ;
76import { useAuthStore } from '@/state/useAuthStore' ;
87import { useWebSocket } from '@/hooks/useWebsocket' ;
@@ -76,14 +75,7 @@ export default function LoadingPage() {
7675 } ;
7776
7877 return (
79- < div className = "flex min-h-screen flex-col bg-[#1a1f2e] text-gray-300" >
80- < header className = "flex items-center justify-between border-b border-gray-700 p-4" >
81- < div className = "flex items-center space-x-2" >
82- < Code className = "h-6 w-6" />
83- < span className = "text-lg font-semibold" > PeerPrep</ span >
84- </ div >
85- < User className = "h-6 w-6" />
86- </ header >
78+ < div className = "flex min-h-screen flex-col bg-gray-900 p-6 text-gray-100" >
8779 < main className = "flex flex-grow flex-col items-center justify-center space-y-6 px-4" >
8880 { matchStatus === 'searching' && (
8981 < >
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import {
1212import { Button } from '@/components/ui/button' ;
1313import { FilterSelect } from '@/app/(main)/components/filter/FilterSelect' ;
1414import { TopicsPopover } from '@/app/(main)/components/filter/TopicsPopover' ;
15- // import { sendMessageToQueue } from '@/lib/rabbitmq';
1615import { axiosClient } from '@/network/axiosClient' ;
1716import { DIFFICULTY_OPTIONS } from '@/lib/constants' ;
1817import { UserMatchingRequest } from '@/types/types' ;
@@ -33,7 +32,6 @@ export function PreMatch() {
3332 difficulty : difficulty ,
3433 type : 'match' ,
3534 } ;
36- // await sendMessageToQueue(message);
3735 await axiosClient . post ( '/matching/send' , message ) ;
3836 setOpen ( false ) ;
3937 router . push ( '/match' ) ;
Original file line number Diff line number Diff line change @@ -46,9 +46,6 @@ export default function Navbar() {
4646 Admin
4747 </ Link >
4848 ) }
49- < Link href = "/" className = "text-gray-300 hover:text-white" >
50- Questions
51- </ Link >
5249 { /* Admin users should be able to add questions instead of match */ }
5350 { path === '/admin' ? (
5451 < Button
@@ -57,7 +54,7 @@ export default function Navbar() {
5754 >
5855 Add Question
5956 </ Button >
60- ) : path !== '/match' ? (
57+ ) : path !== '/match' && isAuth ? (
6158 < PreMatch />
6259 ) : null }
6360 { isAuth ? (
@@ -90,11 +87,6 @@ export default function Navbar() {
9087 Profile
9188 </ Link >
9289 </ DropdownMenuItem >
93- < DropdownMenuItem asChild >
94- < Link href = "/settings" className = "w-full" >
95- Settings
96- </ Link >
97- </ DropdownMenuItem >
9890 < DropdownMenuItem onClick = { handleLogout } >
9991 < LogOut className = "mr-2 h-4 w-4" />
10092 < span > Sign out</ span >
You can’t perform that action at this time.
0 commit comments