Refactor Invoices Component for Improved Readability and Structure
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good

- Streamlined the JSX structure in the Invoices component for better readability.
- Removed unnecessary line breaks and adjusted indentation for consistent formatting.
- Enhanced the organization of child components within the ObjectListViewProvider for clearer hierarchy.
This commit is contained in:
Tom Butcher 2026-09-05 01:59:30 +01:00
parent 5ad0008122
commit 8438757db5

View File

@ -26,13 +26,9 @@ const Invoices = () => {
const [showSortSidebar, setShowSortSidebar] =
useSortSidebarVisibility('Invoices')
return (
<ObjectListViewProvider
objectType='invoice'
tableRef={tableRef}
>
<Flex vertical={'true'} gap='large' className='h-100'>
<ObjectListViewProvider objectType='invoice' tableRef={tableRef}>
<Flex vertical={'true'} gap='large' className='h-100'>
<Flex justify='space-between' style={{ minHeight: 0 }} gap='small'>
<Space size='small'>
<ObjectActions
@ -58,9 +54,7 @@ const Invoices = () => {
active={showFilterSidebar}
onClick={() => setShowFilterSidebar(!showFilterSidebar)}
/>
<ObjectTableViewButton
objectType='invoice'
/>
<ObjectTableViewButton objectType='invoice' />
<ListViewEditButtons showStartingDivider={true} />
</Space>
</Flex>