about summary refs log tree commit diff stats
path: root/js/scripting-lang/web/src/update.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/scripting-lang/web/src/update.js')
-rw-r--r--js/scripting-lang/web/src/update.js38
1 files changed, 0 insertions, 38 deletions
diff --git a/js/scripting-lang/web/src/update.js b/js/scripting-lang/web/src/update.js
deleted file mode 100644
index e13656e..0000000
--- a/js/scripting-lang/web/src/update.js
+++ /dev/null
@@ -1,38 +0,0 @@
-// update.js
-// Pure update function
-
-/**
- * @param {object} state - Current state
- * @param {object} action - { type, payload }
- * @returns {object} new state
- */
-export function update(state, action) {
-  switch (action.type) {
-    case 'UPDATE_QUERY':
-      return { ...state, query: action.payload, error: null };
-    case 'FETCH_START':
-      return { ...state, loading: true, error: null, pokemon: null, evolutionChain: null };
-    case 'FETCH_SUCCESS':
-      return { ...state, loading: false, error: null, pokemon: action.payload };
-    case 'FETCH_ERROR':
-      return { ...state, loading: false, error: action.payload, pokemon: null };
-    case 'FETCH_EVOLUTION_START':
-      return { ...state, loading: true, error: null, evolutionChain: null };
-    case 'FETCH_EVOLUTION_SUCCESS':
-      return { ...state, loading: false, error: null, evolutionChain: action.payload };
-    case 'FETCH_EVOLUTION_ERROR':
-      return { ...state, loading: false, error: action.payload, evolutionChain: null };
-    case 'UPDATE_BABA_YAGA_SCRIPT':
-      return { ...state, babaYagaScript: action.payload, scriptError: null };
-    case 'EXECUTE_SCRIPT_START':
-      return { ...state, scriptError: null, scriptOutput: null };
-    case 'EXECUTE_SCRIPT_SUCCESS':
-      return { ...state, scriptOutput: action.payload, scriptError: null };
-    case 'EXECUTE_SCRIPT_ERROR':
-      return { ...state, scriptError: action.payload, scriptOutput: null };
-    case 'CLEAR_SCRIPT_OUTPUT':
-      return { ...state, scriptOutput: null, scriptError: null };
-    default:
-      return state;
-  }
-} 
\ No newline at end of file