From 2ad5ce929f6d69c9aaca71573744b30e02ab8bed Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Fri, 27 Jun 2025 10:10:56 +0200 Subject: Add cloudflare basic impl --- src/components/SimpleTest.tsx | 32 +++++++ src/components/TaskManager.tsx | 202 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 234 insertions(+) create mode 100644 src/components/SimpleTest.tsx create mode 100644 src/components/TaskManager.tsx (limited to 'src/components') diff --git a/src/components/SimpleTest.tsx b/src/components/SimpleTest.tsx new file mode 100644 index 0000000..cfabeab --- /dev/null +++ b/src/components/SimpleTest.tsx @@ -0,0 +1,32 @@ +import { useState } from 'react'; + +export default function SimpleTest() { + const [count, setCount] = useState(0); + + return ( +
This is a simple React component to test if the infinite refresh is caused by the API calls.
++ If this component works without refreshing, the issue is in the TaskManager API calls. +
+Error: {error}
+ +No tasks yet. Create your first task above!
+ ) : ( + tasks.map((task) => ( ++ {task.description} +
+ )} + {task.created_at && ( ++ Created: {new Date(task.created_at).toLocaleString()} +
+ )} +