fix: resolve 22 remaining issues - type exports, dead code, state mutations, orphaned components
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s

This commit is contained in:
2026-05-18 21:03:43 +02:00
parent a9918e83a6
commit c3a5f333da
31 changed files with 108 additions and 1519 deletions
+7 -17
View File
@@ -13,7 +13,7 @@ export interface UIState {
paused: boolean;
gameOver: boolean;
victory: boolean;
// Actions
addLog: (message: string) => void;
clearLogs: () => void;
@@ -21,7 +21,6 @@ export interface UIState {
setPaused: (paused: boolean) => void;
setGameOver: (gameOver: boolean, victory?: boolean) => void;
reset: () => void;
resetUI: () => void;
}
const MAX_LOGS = 50;
@@ -31,29 +30,29 @@ export const useUIStore = create<UIState>((set) => ({
paused: false,
gameOver: false,
victory: false,
addLog: (message: string) => {
set((state) => ({
logs: [message, ...state.logs.slice(0, MAX_LOGS - 1)],
}));
},
clearLogs: () => {
set({ logs: [] });
},
togglePause: () => {
set((state) => ({ paused: !state.paused }));
},
setPaused: (paused: boolean) => {
set({ paused });
},
setGameOver: (gameOver: boolean, victory: boolean = false) => {
set({ gameOver, victory });
},
reset: () => {
set({
logs: ['✨ The loop begins. You start with Mana Bolt. Gather your strength, mage.'],
@@ -62,13 +61,4 @@ export const useUIStore = create<UIState>((set) => ({
victory: false,
});
},
resetUI: () => {
set({
logs: ['✨ The loop begins. You start with Mana Bolt. Gather your strength, mage.'],
paused: false,
gameOver: false,
victory: false,
});
},
}));