This commit is contained in:
shams mosowi
2019-09-27 17:37:26 +10:00
parent 5921d9ffbb
commit eb73ed02b0
4 changed files with 4 additions and 9 deletions

View File

@@ -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",

View File

@@ -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>

View File

@@ -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}

View File

@@ -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>
);
};