Skip to content

Commit

Permalink
Error fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceman03 committed Jan 16, 2024
1 parent 8b4d967 commit c9b7e82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/cms/src/admin/views/MerchSales.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import { Table } from "payload/dist/admin/components/elements/Table";

const MerchSales: AdminView = ({ user, canAccessAdmin }) => {
// Get data from API
const [data, setData] = useState<IOrder[]>(null);
const [data, setData] = useState<IOrder[]>();

const fetchData = async () => {
try {
const res: IOrder[] = await OrdersApi.getOrders();
setData(res);
} catch (error) {
console.log(error);
console.error(error);
}
};

Expand Down

0 comments on commit c9b7e82

Please sign in to comment.