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 ; }}