From bdc88f5d16eb2ebcb90734a05d09feba521d2b78 Mon Sep 17 00:00:00 2001 From: KS Jannette Date: Wed, 11 Feb 2026 14:12:05 -0500 Subject: [PATCH] building out frontend --- frontend/resias/src/api/api.tsx | 1 + frontend/resias/src/components/stickies.tsx | 18 ++++-------------- frontend/resias/src/components/sticky.tsx | 0 3 files changed, 5 insertions(+), 14 deletions(-) create mode 100644 frontend/resias/src/api/api.tsx create mode 100644 frontend/resias/src/components/sticky.tsx diff --git a/frontend/resias/src/api/api.tsx b/frontend/resias/src/api/api.tsx new file mode 100644 index 0000000..c12d087 --- /dev/null +++ b/frontend/resias/src/api/api.tsx @@ -0,0 +1 @@ +import type { Sticky } from '../types/types'; \ No newline at end of file diff --git a/frontend/resias/src/components/stickies.tsx b/frontend/resias/src/components/stickies.tsx index c53dca2..4e59106 100644 --- a/frontend/resias/src/components/stickies.tsx +++ b/frontend/resias/src/components/stickies.tsx @@ -1,19 +1,9 @@ -import { useQuery } from '@tanstack/react-query'; -import type { Sticky } from '../types/types'; - -const fetchStickies = async (): Promise => { - const response = await fetch('http://localhost:3001/api/notes'); - if (!response.ok) { - throw new Error('Network response was not ok'); - } - return response.json(); - }; +import { useState} from "react"; const Stickies = () => { - const { data, isLoading, error } = useQuery({ - queryKey: ['stickies'], - queryFn: fetchStickies, - }); + const isLoading = useState(false); + const error = useState(false); + let data: any = []; if (isLoading) return
Loading...
; if (error) return
Error: {error.message}
; diff --git a/frontend/resias/src/components/sticky.tsx b/frontend/resias/src/components/sticky.tsx new file mode 100644 index 0000000..e69de29