refactor: cleanup codebase — remove hydration guards, extract constants, fix bugs
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m20s

This commit is contained in:
2026-05-26 11:20:36 +02:00
parent 5c64bb00fa
commit b402b8f56e
23 changed files with 579 additions and 979 deletions
+1 -16
View File
@@ -1,6 +1,6 @@
'use client';
import { useState, useEffect, useCallback } from 'react';
import { useState, useCallback } from 'react';
import { useShallow } from 'zustand/react/shallow';
import { usePrestigeStore, useGameStore } from '@/lib/game/stores';
import { PRESTIGE_DEF } from '@/lib/game/constants/prestige';
@@ -186,8 +186,6 @@ function ResetLoopSection({ loopInsight, onReset }: { loopInsight: number; onRes
// ─── Main Component ───────────────────────────────────────────────────────────
export function PrestigeTab() {
const [mounted, setMounted] = useState(false);
const {
insight,
totalInsight,
@@ -212,11 +210,6 @@ export function PrestigeTab() {
const startNewLoop = useGameStore((s) => s.startNewLoop);
useEffect(() => {
// eslint-disable-next-line react-hooks/set-state-in-effect
setMounted(true);
}, []);
const handlePurchase = useCallback((id: string) => {
doPrestige(id);
}, [doPrestige]);
@@ -225,14 +218,6 @@ export function PrestigeTab() {
startNewLoop();
}, [startNewLoop]);
if (!mounted) {
return (
<div className="flex items-center justify-center p-8 text-gray-500">
Loading prestige
</div>
);
}
const upgradeEntries = Object.entries(PRESTIGE_DEF);
return (