From 8a5461da66e924cef26e1a1aec6071d4c88dad9b Mon Sep 17 00:00:00 2001 From: Thith-thith Date: Thu, 24 Aug 2023 22:27:47 -0400 Subject: [PATCH] fixed --- client/src/pages/products/index.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/client/src/pages/products/index.tsx b/client/src/pages/products/index.tsx index bd1a088..643f91f 100644 --- a/client/src/pages/products/index.tsx +++ b/client/src/pages/products/index.tsx @@ -1,10 +1,14 @@ -import { Component, For } from "solid-js"; +import { Component, For, createResource } from "solid-js"; import Cards from "../../components/cards/Cards"; -import CoreProducts from "../../data/Core-Product"; import { A } from "@solidjs/router"; -import { Carousel } from "flowbite"; const Products: Component<{}> = () => { + const fetchData = async () => { + const res = await fetch("https://cptdb.koompi.com/CoreProducts"); + return res.json(); + }; + const [coreProducts] = createResource(fetchData); + return (
@@ -476,7 +480,7 @@ const Products: Component<{}> = () => {
- + {(res) => { return ; }}