feat(branches& warehouses): add empty status.

This commit is contained in:
elforjani13
2022-02-07 23:00:56 +02:00
parent be2d84577e
commit 19a3de3122
6 changed files with 119 additions and 15 deletions

View File

@@ -3,6 +3,7 @@ import styled from 'styled-components';
import { DataTable } from 'components';
import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
import BranchesEmptyStatus from './BranchesEmptyStatus';
import { useBranchesTableColumns, ActionsMenu } from './components';
import { useBranchesContext } from './BranchesProvider';
@@ -24,6 +25,8 @@ function BranchesDataTable({
// Table columns.
const columns = useBranchesTableColumns();
const Time = true;
const { branches, isBranchesLoading, isBranchesFetching } =
useBranchesContext();
@@ -35,6 +38,10 @@ function BranchesDataTable({
openAlert('branch-delete', { branchId: id });
};
if (Time) {
return <BranchesEmptyStatus />;
}
return (
<BranchesTable
columns={columns}