Skip to content

Commit 8449905

Browse files
refactor(shared table line): remove last unused props
1 parent afdb5c3 commit 8449905

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/shared/components/Table/Body/Body.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export type TBody = {
2626

2727
const Body = ({ items = [], children }: TBody) => (
2828
<TableTk.Body>
29-
{items.map(({ key, classModifier, cols }, index) => (
30-
<Line key={key} lineNumber={index + 1} classModifier={classModifier} cols={Object.entries({ ...cols })} />
29+
{items.map(({ key, classModifier, cols }) => (
30+
<Line key={key} classModifier={classModifier} cols={Object.entries({ ...cols })} />
3131
))}
3232
{children}
3333
</TableTk.Body>

src/shared/components/Table/Body/Line/Line.container.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import Line, { TLine } from './Line';
44
export type TLineContainer = Omit<TLine, 'columns'> & {
55
LineCmpt?: typeof Line;
66
cols: [string, Tcol][];
7-
lineNumber: number;
87
};
98

109
const LineContainer = ({ LineCmpt = Line, cols, ...restLineProps }: TLineContainer) => {

src/shared/components/Table/Body/Line/__tests__/Line.container.test.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const cols = [
1717

1818
describe('LineContainer', () => {
1919
it('Render <LineContainer/> with cols and actions', () => {
20-
renderWithContainer(<LineContainer {...defaultProps} cols={cols} lineNumber={1} itemsType="users" />, container);
20+
renderWithContainer(<LineContainer {...defaultProps} cols={cols} />, container);
2121

2222
expect(LineCmpt).toHaveBeenCalledWith(
2323
{
@@ -39,8 +39,6 @@ describe('LineContainer', () => {
3939
label: 'F',
4040
},
4141
],
42-
lineNumber: 1,
43-
itemsType: 'users',
4442
},
4543
{},
4644
);

0 commit comments

Comments
 (0)