From 71df3ff279a1d0c071e989306b080e5268d59e18 Mon Sep 17 00:00:00 2001 From: Thith-thith Date: Mon, 7 Aug 2023 04:52:03 -0400 Subject: [PATCH] Changes to be committed: modified: client/src/pages/products/index.tsx --- client/src/pages/products/index.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/client/src/pages/products/index.tsx b/client/src/pages/products/index.tsx index 0ae101a..952abde 100644 --- a/client/src/pages/products/index.tsx +++ b/client/src/pages/products/index.tsx @@ -1,12 +1,13 @@ import { Component, For, Show, createResource } from "solid-js"; import Cards from "../../components/cards/Cards"; -const fetchData = async () => { - const res = await fetch("https://cptdb.koompi.com/CoreProducts"); - return res.json(); -}; const Products: Component<{}> = () => { - const [AllCoreProducts] = createResource(fetchData); + const fetchData = async () => { + const res = await fetch("https://cptdb.koompi.com/CoreProducts"); + return res.json(); + }; + + const [allProducts] = createResource(fetchData); return (
@@ -686,8 +687,8 @@ const Products: Component<{}> = () => {
- Loading...

}> - + Loading...

}> + {(CoreProducts) => { return ; }}