Skip to content

Commit

Permalink
Remove table container
Browse files Browse the repository at this point in the history
  • Loading branch information
adhityamamallan committed Dec 30, 2024
1 parent 9e3cb7a commit 9d9df08
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 32 deletions.
7 changes: 0 additions & 7 deletions src/views/shared/workflows-table/workflows-table.styles.ts

This file was deleted.

47 changes: 22 additions & 25 deletions src/views/shared/workflows-table/workflows-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Table from '@/components/table/table';

import workflowsTableNonSortableConfig from './config/workflows-table-non-sortable.config';
import workflowsTableSortableConfig from './config/workflows-table-sortable.config';
import { styled } from './workflows-table.styles';
import { type Props } from './workflows-table.types';

export default function WorkflowsTable({
Expand All @@ -18,29 +17,27 @@ export default function WorkflowsTable({
sortParams,
}: Props) {
return (
<styled.TableContainer>
<Table
data={workflows}
shouldShowResults={!isLoading && workflows.length > 0}
endMessageProps={{
kind: 'infinite-scroll',
hasData: workflows.length > 0,
error,
fetchNextPage,
hasNextPage,
isFetchingNextPage,
}}
{...(sortParams !== undefined
? {
columns: workflowsTableSortableConfig,
onSort: sortParams.onSort,
sortColumn: sortParams.sortColumn,
sortOrder: sortParams.sortOrder,
}
: {
columns: workflowsTableNonSortableConfig,
})}
/>
</styled.TableContainer>
<Table
data={workflows}
shouldShowResults={!isLoading && workflows.length > 0}
endMessageProps={{
kind: 'infinite-scroll',
hasData: workflows.length > 0,
error,
fetchNextPage,
hasNextPage,
isFetchingNextPage,
}}
{...(sortParams !== undefined
? {
columns: workflowsTableSortableConfig,
onSort: sortParams.onSort,
sortColumn: sortParams.sortColumn,
sortOrder: sortParams.sortOrder,
}
: {
columns: workflowsTableNonSortableConfig,
})}
/>
);
}

0 comments on commit 9d9df08

Please sign in to comment.