import { BrowserRouter, Link, Route, Routes } from 'react-router'; import { useMsal } from '@azure/msal-react'; import DevAuthSwitcher from './components/DevAuthSwitcher'; import { DEFAULT_COMMUNITY_ID } from './config'; import { useCommunity } from './api/hooks'; import { isMsalConfigured } from './lib/auth/msal.config'; import AuthCallbackPage from './pages/AuthCallback'; import HomePage from './pages/HomePage'; import LoginPage from './pages/Login'; import MatchDetailPage from './pages/MatchDetailPage'; import MatchTeamProgressPage from './pages/MatchTeamProgressPage'; import AuctionPage from './pages/AuctionPage'; import UserHistoryPage from './pages/UserHistoryPage'; import CommunityInternalStatsPage from './pages/CommunityInternalStatsPage'; import InternalMatchDetailPage from './pages/InternalMatchDetailPage'; import LegacyImportPage from './pages/admin/LegacyImportPage'; import LegacyMatchesPage from './pages/admin/LegacyMatchesPage'; import MatchAdminPage from './pages/admin/MatchAdminPage'; import TournamentCodesPage from './pages/admin/TournamentCodesPage'; function MsalHeaderActions() { const { accounts, instance } = useMsal(); const account = instance.getActiveAccount() ?? accounts[0]; if (!account) { return ( 로그인 ); } return ( ); } function App() { const communityQuery = useCommunity(DEFAULT_COMMUNITY_ID); const communityLabel = communityQuery.data?.name ?? 'LOLYMPUS'; return (
} /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } />
); } export default App;