Skip to content

Commit afd13c3

Browse files
committed
Remove code redundancy
1 parent 00b3c87 commit afd13c3

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/DSVImport.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { getDSVImportContext } from './features/context';
44
import { createSimpleParserMiddleware } from './middlewares/simpleParserMiddleware';
55
import { State } from './models/state';
66

7-
interface Props<T> {
7+
export interface Props<T> {
88
onChange?: (value: T[]) => void;
99
columns: ColumnsType<T>;
1010
}

src/index.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
import { TextareaInput } from './components/inputs/TextareaInput';
22
import { TablePreview } from './components/previews/TablePreview';
3-
import { DSVImport as Import } from './DSVImport';
4-
5-
import { ColumnsType } from './models/column';
3+
import { DSVImport as Import, Props } from './DSVImport';
64
import { PropsWithChildren } from 'react';
75

8-
interface Props<T> {
9-
onChange?: (value: T[]) => void;
10-
columns: ColumnsType<T>;
11-
}
12-
136
export function DSVImport<T extends { [key: string]: string }>(props: PropsWithChildren<Props<T>>) {
147
return Import<T>(props);
158
}

0 commit comments

Comments
 (0)