diff --git a/Admin.tsx b/Admin.tsx index 4290183..a465c36 100644 --- a/Admin.tsx +++ b/Admin.tsx @@ -24,9 +24,9 @@ export const Admin: React.FC = () => { }, [state.challenges]); const sortedOperators = useMemo(() => { - return state.teams + return [...state.teams] .filter(t => t.id !== 'admin-0') - .sort((a, b) => a.name.localeCompare(b.name)); + .sort((a, b) => (a.name || '').localeCompare(b.name || '', undefined, { sensitivity: 'base' })); }, [state.teams]); useEffect(() => { diff --git a/App.tsx b/App.tsx index fd3b9d4..c57bcb3 100644 --- a/App.tsx +++ b/App.tsx @@ -1,5 +1,5 @@ -import React, { useState } from 'react'; +import React, { useState, useEffect } from 'react'; import { HashRouter, Routes, Route, Link, Navigate } from 'react-router-dom'; import { Terminal, Flag, Trophy, Newspaper, Shield, Settings, LogOut, X, History } from 'lucide-react'; import { CTFProvider, useCTF } from './CTFContext'; @@ -44,6 +44,12 @@ const LayoutShell: React.FC = () => { const { state, currentUser, logout, loading, loadError } = useCTF(); const [showProfileModal, setShowProfileModal] = useState(false); + useEffect(() => { + if (state.config && state.config.conferenceName) { + document.title = state.config.conferenceName; + } + }, [state.config]); + if (loading) return