mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-24 00:29:49 +00:00
33 lines
810 B
TypeScript
33 lines
810 B
TypeScript
// @ts-nocheck
|
|
import React from 'react';
|
|
import WarehousesEmptyStatus from './WarehousesEmptyStatus';
|
|
import { useWarehousesContext } from './WarehousesProvider';
|
|
import { WarehousesList, WarehousesSkeleton } from './components';
|
|
import WarehousesGridItems from './WarehousesGridItems';
|
|
|
|
/**
|
|
* Warehouses grid.
|
|
*/
|
|
export default function WarehousesGrid() {
|
|
// Retrieve list context.
|
|
const {
|
|
warehouses,
|
|
isWarehouesLoading,
|
|
isEmptyStatus,
|
|
} = useWarehousesContext();
|
|
|
|
return (
|
|
<React.Fragment>
|
|
<WarehousesList>
|
|
{isWarehouesLoading ? (
|
|
<WarehousesSkeleton />
|
|
) : isEmptyStatus ? (
|
|
<WarehousesEmptyStatus />
|
|
) : (
|
|
<WarehousesGridItems warehouses={warehouses} />
|
|
)}
|
|
</WarehousesList>
|
|
</React.Fragment>
|
|
);
|
|
}
|