mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-28 16:06:41 +01:00
csv
This commit is contained in:
@@ -20,11 +20,7 @@
|
||||
"@types/react-router-dom": "^4.3.5",
|
||||
"@types/react-sortable-hoc": "^0.6.5",
|
||||
"@types/react-virtualized": "^9.21.4",
|
||||
<<<<<<< HEAD
|
||||
"@types/xlsx": "^0.0.36",
|
||||
=======
|
||||
"algoliasearch": "^3.34.0",
|
||||
>>>>>>> 388c726eacf3bd64f948944e2771b63a8afddedc
|
||||
"array-move": "^2.1.0",
|
||||
"attr-accept": "^1.1.3",
|
||||
"convert-csv-to-json": "^0.0.15",
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
} from "@material-ui/core";
|
||||
|
||||
// TODO: Create an interface for props
|
||||
export default function ImportExcel(props: any) {
|
||||
export default function ImportCSV(props: any) {
|
||||
const { classes, columnName, updateColumn } = props;
|
||||
const [open, setOpen] = React.useState(false);
|
||||
const onDrop = useCallback(async acceptedFiles => {
|
||||
@@ -63,7 +63,7 @@ export default function ImportExcel(props: any) {
|
||||
<div {...getRootProps()}>
|
||||
<input {...getInputProps()} />
|
||||
|
||||
<p>Drag 'n' drop .xlsx here, or click to select file</p>
|
||||
<p>Drag 'n' drop .csv here, or click to select file</p>
|
||||
</div>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
} from "./grid-fns";
|
||||
|
||||
import { CLOUD_FUNCTIONS } from "firebase/callables";
|
||||
import ImportCSV from "components/ImportCSV";
|
||||
const deleteAlgoliaRecord = functions.httpsCallable(
|
||||
CLOUD_FUNCTIONS.deleteAlgoliaRecord
|
||||
);
|
||||
@@ -157,6 +158,7 @@ function Table(props: any) {
|
||||
}}
|
||||
/>
|
||||
<Button onClick={tableActions.row.add}>Add Row</Button>
|
||||
<ImportCSV />
|
||||
<ColumnEditor
|
||||
handleClose={handleCloseHeader}
|
||||
anchorEl={anchorEl}
|
||||
|
||||
@@ -13,7 +13,6 @@ import {
|
||||
|
||||
import useSettings from "../hooks/useSettings";
|
||||
import useRouter from "../hooks/useRouter";
|
||||
import ImportExcel from "components/ExcelImport";
|
||||
|
||||
const useStyles = makeStyles(() =>
|
||||
createStyles({
|
||||
@@ -70,8 +69,6 @@ const TablesView = (props: any) => {
|
||||
</Card>
|
||||
))
|
||||
: "TODO: card skeleton"}
|
||||
|
||||
<ImportExcel />
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user