Added solves log
This commit is contained in:
5
App.tsx
5
App.tsx
@@ -1,7 +1,7 @@
|
||||
|
||||
import React, { useState } from 'react';
|
||||
import { HashRouter, Routes, Route, Link, Navigate } from 'react-router-dom';
|
||||
import { Terminal, Flag, Trophy, Newspaper, Shield, Settings, LogOut, X } from 'lucide-react';
|
||||
import { Terminal, Flag, Trophy, Newspaper, Shield, Settings, LogOut, X, History } from 'lucide-react';
|
||||
import { CTFProvider, useCTF } from './CTFContext';
|
||||
import { ProtectedRoute, Button, Countdown } from './UIComponents';
|
||||
import { Home } from './Home';
|
||||
@@ -10,6 +10,7 @@ import { Blog } from './Blog';
|
||||
import { Scoreboard, ScoreMatrix } from './Scoreboard';
|
||||
import { Admin } from './Admin';
|
||||
import { Login, Register } from './Auth';
|
||||
import { Log } from './Log';
|
||||
|
||||
const ProfileSettingsModal: React.FC<{ onClose: () => void }> = ({ onClose }) => {
|
||||
const { updateProfile } = useCTF();
|
||||
@@ -73,6 +74,7 @@ const LayoutShell: React.FC = () => {
|
||||
<Link to="/challenges" className="hover:text-[#bf00ff] flex items-center gap-2 transition-colors"><Flag size={14}/> Challenges</Link>
|
||||
<Link to="/blog" className="hover:text-[#bf00ff] flex items-center gap-2 transition-colors"><Newspaper size={14}/> Blog</Link>
|
||||
<Link to="/scoreboard" className="hover:text-[#bf00ff] flex items-center gap-2 transition-colors"><Trophy size={14}/> Scoreboard</Link>
|
||||
{currentUser ? <Link to="/log" className="hover:text-[#bf00ff] flex items-center gap-2 transition-colors"><History size={14}/> Log</Link> : null}
|
||||
{currentUser?.isAdmin ? <Link to="/admin" className="text-[#ff0000] hover:text-white transition-colors flex items-center gap-2"><Shield size={14}/> Admin</Link> : null}
|
||||
</div>
|
||||
{isEventLive && (
|
||||
@@ -98,6 +100,7 @@ const LayoutShell: React.FC = () => {
|
||||
<Route path="/challenges" element={<ProtectedRoute><ChallengeList /></ProtectedRoute>} />
|
||||
<Route path="/blog" element={<Blog />} />
|
||||
<Route path="/scoreboard" element={<Scoreboard />} />
|
||||
<Route path="/log" element={<ProtectedRoute><Log /></ProtectedRoute>} />
|
||||
<Route path="/matrix" element={<ScoreMatrix />} />
|
||||
<Route path="/admin" element={<ProtectedRoute>{currentUser?.isAdmin ? <Admin /> : <Navigate to="/" />}</ProtectedRoute>} />
|
||||
<Route path="*" element={<Navigate to="/" />} />
|
||||
|
||||
Reference in New Issue
Block a user