feat: add profile editing (bio, display name, stat visibility)

This commit is contained in:
2026-03-06 13:56:12 -08:00
committed by Naomi Carrigan
parent 32c13f73c4
commit 7e04daa073
11 changed files with 525 additions and 30 deletions
@@ -7,6 +7,7 @@ import { AdventurerPanel } from "./AdventurerPanel.js";
import { BattleModal } from "./BattleModal.js";
import { BossPanel } from "./BossPanel.js";
import { ClickArea } from "./ClickArea.js";
import { EditProfileModal } from "./EditProfileModal.js";
import { EquipmentPanel } from "./EquipmentPanel.js";
import { OfflineModal } from "./OfflineModal.js";
import { PrestigePanel } from "./PrestigePanel.js";
@@ -28,6 +29,7 @@ const TABS: { id: Tab; label: string }[] = [
export const GameLayout = (): React.JSX.Element => {
const { state, isLoading, error, battleResult, dismissBattle } = useGame();
const [activeTab, setActiveTab] = useState<Tab>("adventurers");
const [editingProfile, setEditingProfile] = useState(false);
if (isLoading) {
return (
@@ -55,12 +57,16 @@ export const GameLayout = (): React.JSX.Element => {
resources={state.resources}
prestigeCount={state.prestige.count}
profileUrl={profileUrl}
onEditProfile={() => { setEditingProfile(true); }}
/>
<OfflineModal />
<AchievementToast />
{battleResult && (
<BattleModal battle={battleResult} onDismiss={dismissBattle} />
)}
{editingProfile && (
<EditProfileModal onClose={() => { setEditingProfile(false); }} />
)}
<div className="game-main">
<aside className="game-sidebar">