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

@@ -44,12 +44,7 @@ const DEFAULT_PAGE_LIMIT = 20;
export function useAgentTypes(params: AgentTypeListParams = {}) {
const { user } = useAuth();
const {
page = 1,
limit = DEFAULT_PAGE_LIMIT,
is_active = true,
search,
} = params;
const { page = 1, limit = DEFAULT_PAGE_LIMIT, is_active = true, search } = params;
return useQuery({
queryKey: agentTypeKeys.list({ page, limit, is_active, search }),
@@ -152,10 +147,7 @@ export function useUpdateAgentType() {
},
onSuccess: (updatedAgentType) => {
// Update the cache for this specific agent type
queryClient.setQueryData(
agentTypeKeys.detail(updatedAgentType.id),
updatedAgentType
);
queryClient.setQueryData(agentTypeKeys.detail(updatedAgentType.id), updatedAgentType);
// Invalidate lists to reflect changes
queryClient.invalidateQueries({ queryKey: agentTypeKeys.lists() });
},