Skip to content

Commit

Permalink
Merge pull request #1860 from hackforla/1837-remove-makeSyles-from-Im…
Browse files Browse the repository at this point in the history
…portFile

Remove makeStyles from ImportFile
  • Loading branch information
VirginiaWu11 authored Oct 9, 2023
2 parents 50a9810 + d6e55c4 commit e0fa428
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions client/src/components/Admin/ImportOrganizations/ImportFile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useState, useEffect } from "react";
import { useNavigate } from "react-router-dom";
import { Typography } from "@mui/material";
import makeStyles from "@mui/styles/makeStyles";
import { uploadCsv, importCsv } from "../../../services/import-service";
import exportCsv from "../../../services/export-service";
import ImportFileTable from "./ImportFileTable";
Expand All @@ -14,26 +13,6 @@ import { useUserContext } from "../../../contexts/userContext";
import { useToasterContext } from "../../../contexts/toasterContext";
import { useSiteContext } from "../../../contexts/siteContext";

const useStyles = makeStyles((theme) => ({
root: {
textAlign: "center",
},
section: {
marginTop: theme.spacing(2),
maxWidth: "800px",
margin: "0 auto",
padding: theme.spacing(4),
borderRadius: "8px",
boxShadow: "-.2rem 0 2rem #C7CCD1",
"& strong": {
color: theme.palette.error.main,
},
"& button": {
marginTop: theme.spacing(2),
},
},
}));

const initialImportData = {
data: null,
action: null,
Expand All @@ -51,7 +30,6 @@ const ImportFile = () => {
});
const [dialog, setDialog] = useState(false);
const [loading, setLoading] = useState(false);
const classes = useStyles();
let formData = React.useMemo(() => new FormData(), []);
const [view, setView] = useState(
user && user.isAdmin ? "adminAccessNotice" : "fileGuide"
Expand Down Expand Up @@ -134,7 +112,7 @@ const ImportFile = () => {
if (!validationCheck) {
setToast({
message:
"File fields could not be validated. Please doublecheck format, schema, and column names.",
"File fields could not be validated. Please double check format, schema, and column names.",
});
return;
}
Expand All @@ -149,7 +127,7 @@ const ImportFile = () => {
console.error(err.message);
setToast({
message:
"File could not be imported. Please doublecheck format, schema, and column names.",
"File could not be imported. Please double check format, schema, and column names.",
});
});
setDialog(false);
Expand Down Expand Up @@ -216,7 +194,7 @@ const ImportFile = () => {
};

return (
<main className={classes.root}>
<>
<div>
{renderView()}
<ImportDialog
Expand All @@ -233,7 +211,7 @@ const ImportFile = () => {
messageOnLoad="Importing file. This may take up to a minute."
// handleCancelUpload={handleCancelUpload}
/>
</main>
</>
);
};

Expand Down

0 comments on commit e0fa428

Please sign in to comment.