{customersIsLoading && }
{rows?.length === 0 && !customersIsLoading ? (
No customers to show
{searchword ? 'Try a different keyword.' : 'Pick a zone above to load the directory.'}
) : (
rows?.map((row, index) => (
{row.firstname || 'โ'}
ID #{row.customerid}
{
setSelectedCustomer(row);
setTimeout(() => setOpen(true), 0);
}}
sx={{
bgcolor: soft('#8b5cf6'),
color: '#8b5cf6',
border: `1px solid ${edge('#8b5cf6')}`,
flexShrink: 0,
'&:hover': { bgcolor: '#8b5cf6', color: '#fff' }
}}
>
}
>
{row.suburb ? (
{row.suburb}
) : (
โ
)}
{row.address || 'โ'}
))
)}
{rows?.length !== 0 && (
{isFetchingNextPage || hasNextPage ? (
) : (
No more customers
)}
)}
) : (