generated from nhcarrigan/template
feat: add public leaderboards with opt-out privacy setting
This commit is contained in:
@@ -2,6 +2,7 @@ import { useState } from "react";
|
||||
import { GameProvider } from "./context/GameContext.js";
|
||||
import { CharacterPage } from "./components/game/CharacterPage.js";
|
||||
import { GameLayout } from "./components/game/GameLayout.js";
|
||||
import { LeaderboardPage } from "./components/game/LeaderboardPage.js";
|
||||
import { LoginPage } from "./components/game/LoginPage.js";
|
||||
import { ProfilePage } from "./components/game/ProfilePage.js";
|
||||
|
||||
@@ -49,6 +50,10 @@ export const App = (): React.JSX.Element => {
|
||||
return <CharacterPage discordId={characterDiscordId} />;
|
||||
}
|
||||
|
||||
if (window.location.pathname === "/leaderboards") {
|
||||
return <LeaderboardPage />;
|
||||
}
|
||||
|
||||
if (!loggedIn) {
|
||||
return <LoginPage onLogin={() => { setLoggedIn(true); }} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user