Skip to content

Commit 9f0c2f1

Browse files
committed
hide match button and remove redundant buttons
1 parent 42e4624 commit 9f0c2f1

File tree

6 files changed

+15
-24
lines changed

6 files changed

+15
-24
lines changed

docker-compose.prod.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: "3.8"
2-
31
services:
42
redis-server:
53
image: redis:latest

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: "3.8"
2-
31
services:
42
redis-server:
53
image: redis:latest
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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;

peerprep-fe/src/app/match/page.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import { useState, useEffect } from 'react';
44
import { useRouter } from 'next/navigation';
5-
import { User, Code } from 'lucide-react';
65
import { Button } from '@/components/ui/button';
76
import { useAuthStore } from '@/state/useAuthStore';
87
import { 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
<>

peerprep-fe/src/components/dialogs/PreMatch.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
import { Button } from '@/components/ui/button';
1313
import { FilterSelect } from '@/app/(main)/components/filter/FilterSelect';
1414
import { TopicsPopover } from '@/app/(main)/components/filter/TopicsPopover';
15-
// import { sendMessageToQueue } from '@/lib/rabbitmq';
1615
import { axiosClient } from '@/network/axiosClient';
1716
import { DIFFICULTY_OPTIONS } from '@/lib/constants';
1817
import { 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');

peerprep-fe/src/components/navbar/Navbar.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff 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>

0 commit comments

Comments
 (0)