aboutsummaryrefslogtreecommitdiff
path: root/src/features/counter/counterAPI.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/features/counter/counterAPI.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/features/counter/counterAPI.js b/src/features/counter/counterAPI.js
new file mode 100644
index 0000000..cc9b4a4
--- /dev/null
+++ b/src/features/counter/counterAPI.js
@@ -0,0 +1,6 @@
+// A mock function to mimic making an async request for data
+export function fetchCount(amount = 1) {
+ return new Promise((resolve) =>
+ setTimeout(() => resolve({ data: amount }), 500)
+ );
+}