mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 14:51:12 -05:00
Remove debug console logs
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
import type { SubmissionItemWithDeps } from './submissionItemsService';
|
||||
import { logger } from './logger';
|
||||
|
||||
// State definitions using discriminated unions
|
||||
export type ModerationState =
|
||||
@@ -63,7 +64,7 @@ export function moderationReducer(
|
||||
|
||||
case 'LOCK_EXPIRED':
|
||||
if (state.status !== 'locked' && state.status !== 'reviewing' && state.status !== 'loading_data') {
|
||||
console.warn(`Lock expired notification in unexpected state: ${state.status}`);
|
||||
logger.warn(`Lock expired notification in unexpected state: ${state.status}`);
|
||||
return state;
|
||||
}
|
||||
return {
|
||||
@@ -123,7 +124,7 @@ export function moderationReducer(
|
||||
case 'ERROR':
|
||||
// Error can happen from most states
|
||||
if (state.status === 'idle' || state.status === 'complete') {
|
||||
console.warn('Error action in terminal state');
|
||||
logger.warn('Error action in terminal state');
|
||||
return state;
|
||||
}
|
||||
return {
|
||||
@@ -135,7 +136,7 @@ export function moderationReducer(
|
||||
case 'RELEASE_LOCK':
|
||||
// Can release lock from locked, reviewing, or error states
|
||||
if (state.status !== 'locked' && state.status !== 'reviewing' && state.status !== 'error' && state.status !== 'lock_expired' && state.status !== 'loading_data') {
|
||||
console.warn(`Cannot release lock from state: ${state.status}`);
|
||||
logger.warn(`Cannot release lock from state: ${state.status}`);
|
||||
return state;
|
||||
}
|
||||
return { status: 'idle' };
|
||||
|
||||
Reference in New Issue
Block a user