-
-
Orders
+ // const [orderss, setOrders] = useState
([]);
+ // useEffect(() => {
+ // const fetchData = async () => {
+ // const response: any = await request.get('/orders');
+ // setOrders(response.orders);
+ // };
+ // fetchData();
+ // }, [])
+ const orders: any = [
+ {
+ name: 'Sneakers N12',
+ desc: "Men's Shoes",
+ },
+ {
+ name: 'Toyota',
+ desc: 'Best car in city',
+ },
+ {
+ name: 'Girl Dress',
+ desc: 'tkacheanton dress',
+ },
+ ];
+ useEffect(() => {}, []);
+ return (
+
+
+
Orders
+
+
+ {orders?.map((order: any, index: any) => {
+ return (
+
+
+ {order.name}
+
+
+ {order.desc}
+
-
- {
- orders?.map((order: any, index: any) => {
- return (
-
- {order.name}
- {order.desc}
-
- )
- })
- }
-
-
- )
+ );
+ })}
+
+
+ );
}
-export default Order
-
-
-
-
-
+export default Order;
diff --git a/src/components/profile/ProfileHeader.tsx b/src/components/profile/ProfileHeader.tsx
index 5025bf9..eaaed72 100644
--- a/src/components/profile/ProfileHeader.tsx
+++ b/src/components/profile/ProfileHeader.tsx
@@ -60,7 +60,12 @@ function ProfileHeader() {
fetchData();
}, [dispatch]);
- if (loading) return
Loading...
;
+ if (loading)
+ return (
+
+ );
if (!user) return
No user found
;
diff --git a/src/components/profile/wishlist.tsx b/src/components/profile/wishlist.tsx
index 39862ad..b91005c 100644
--- a/src/components/profile/wishlist.tsx
+++ b/src/components/profile/wishlist.tsx
@@ -75,10 +75,9 @@ const Wishlist: React.FC = () => {
}
};
- if (loading) return
Loading...
;
if (error) return
Error: {error}
;
if (!user) return
No user found
;
- console.log(wishlist, '------------ wishlist');
+
return (