refactor(frontend): clean up code by consolidating multi-line JSX into single lines where feasible

- Refactored JSX elements to improve readability by collapsing multi-line props and attributes into single lines if their length permits.
- Improved consistency in component imports by grouping and consolidating them.
- No functional changes, purely restructuring for clarity and maintainability.
This commit is contained in:
2026-01-01 11:46:57 +01:00
parent a7ba0f9bd8
commit a4c91cb8c3
77 changed files with 600 additions and 907 deletions

View File

@@ -356,9 +356,7 @@ describe('ActivityFeed', () => {
await user.click(within(eventItem).getByTestId('approve-button'));
expect(onApprove).toHaveBeenCalledTimes(1);
expect(onApprove).toHaveBeenCalledWith(
expect.objectContaining({ id: 'event-001' })
);
expect(onApprove).toHaveBeenCalledWith(expect.objectContaining({ id: 'event-001' }));
});
it('calls onReject when reject button clicked', async () => {
@@ -370,9 +368,7 @@ describe('ActivityFeed', () => {
await user.click(within(eventItem).getByTestId('reject-button'));
expect(onReject).toHaveBeenCalledTimes(1);
expect(onReject).toHaveBeenCalledWith(
expect.objectContaining({ id: 'event-001' })
);
expect(onReject).toHaveBeenCalledWith(expect.objectContaining({ id: 'event-001' }));
});
it('shows pending count badge', () => {
@@ -440,9 +436,7 @@ describe('ActivityFeed', () => {
await user.click(screen.getByTestId('event-item-event-001'));
expect(onEventClick).toHaveBeenCalledTimes(1);
expect(onEventClick).toHaveBeenCalledWith(
expect.objectContaining({ id: 'event-001' })
);
expect(onEventClick).toHaveBeenCalledWith(expect.objectContaining({ id: 'event-001' }));
});
});
@@ -459,7 +453,9 @@ describe('ActivityFeed', () => {
describe('Accessibility', () => {
it('has proper ARIA labels for interactive elements', () => {
render(<ActivityFeed {...defaultProps} onReconnect={jest.fn()} connectionState="disconnected" />);
render(
<ActivityFeed {...defaultProps} onReconnect={jest.fn()} connectionState="disconnected" />
);
expect(screen.getByLabelText('Reconnect')).toBeInTheDocument();
});