import { View, Text } from "react-native";
import { useState, useEffect, use } from "react";
import { listOrders } from "@/api/order";

export default function UserOrders() {
  const [orders, setOrders] = useState([]);

  useEffect(() => {
    const fetchOrders = async () => {
      try {
        const data = await listOrders();
        setOrders(data);
      } catch (err) {}
    };
    fetchOrders();
  }, []);

  console.log("Orders:", orders);
  return (
    <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
      <Text>Orders</Text>
    </View>
  );
}
