Restore React purity checks and streamline inline drafts
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s

This commit is contained in:
Shinuwa 2026-09-11 09:17:45 +02:00
parent 2bff58f08c
commit b9cc77a4d1
8 changed files with 111 additions and 10 deletions

View file

@ -28,7 +28,7 @@ function formatAlertMessage(template, toolbox, label) {
export function useToolboxAlerts({ toolboxes, moduleData, links, route, drawerGameId, normalizeTimerData, normalizeCalendarData, textContent, notify }) {
const previousTargetsRef = useRef(new Map());
const resumedCalendarEventsRef = useRef(new Set());
const lastTickRef = useRef(Date.now());
const lastTickRef = useRef(null);
useEffect(() => {
const visibleToolboxIds = getVisibleToolboxIds(route, drawerGameId, links);
@ -38,7 +38,7 @@ export function useToolboxAlerts({ toolboxes, moduleData, links, route, drawerGa
function tick() {
const nowMs = Date.now();
const lastTickMs = lastTickRef.current;
const lastTickMs = lastTickRef.current ?? nowMs;
const nextTargets = new Map();
toolboxes.forEach((toolbox) => {