Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace deprecated libraries and setup redux toolkit #36

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
744 changes: 135 additions & 609 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 5 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,19 @@
"dependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@mui/icons-material": "^5.14.18",
"@mui/material": "^5.14.18",
"@mui/styles": "^5.14.18",
"@mui/x-date-pickers-pro": "^6.18.4",
"@reduxjs/toolkit": "^2.0.1",
"axios": "^1.6.3",
"date-fns": "^3.2.0",
"firebase": "^10.7.1",
"firebase-auth": "^0.1.2",
"mui-datatables": "^4.3.0",
"next": "14.0.3",
"next": "^14.0.4",
"react": "^18",
"react-date-range": "^1.4.0",
"react-date-range": "^2.0.0-alpha.4",
"react-dom": "^18",
"react-router-dom": "^6.20.1",
"redux": "^5.0.1",
"redux-devtools-extension": "^2.13.9",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-thunk": "^3.1.0"
"react-redux": "^9.0.4"
},
"devDependencies": {
"autoprefixer": "^10.4.16",
Expand Down
15 changes: 15 additions & 0 deletions src/app/StoreProvider.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'use client'
import { useRef } from 'react'
import { Provider } from 'react-redux'
import { makeStore } from '../redux/store'

export const dynamic = 'force-dynamic'
export default function StoreProvider({ children }) {
const storeRef = useRef();
if (!storeRef.current) {
// Create the store instance the first time this renders
storeRef.current = makeStore();
}

return <Provider store={storeRef.current}>{children}</Provider>
}
Empty file.
Empty file removed src/app/actions/user/SignIn.js
Empty file.
51 changes: 23 additions & 28 deletions src/app/change-password/page.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,29 @@
'use client'
import {
Card,
Grid,
ThemeProvider,
Typography,
InputAdornment,
} from "@mui/material";
import React, { useEffect, useState } from "react";
import themeDefault from "../../themes/theme";
import { translate } from "../../config/localisation";
// import { useNavigate, useParams } from "react-router-dom";
import Button from "../components/common/Button";
import OutlinedTextField from "../components/common/OutlinedTextField";
import DatasetStyle from "../../styles/Dataset";
Card,
Grid,
ThemeProvider,
Typography,
InputAdornment,
IconButton,
} from "@mui/material";
import React, { useEffect, useState } from "react";
import themeDefault from "../../themes/theme";
import { translate } from "../../config/localisation";
import Button from "../../components/common/Button";
import OutlinedTextField from "../../components/common/OutlinedTextField";
import "../../styles/Dataset.css";
// import { useDispatch, useSelector } from "react-redux";
// import APITransport from "../../../../redux/actions/apitransport/apitransport";
// import ChangePasswordAPI from "../../../../redux/actions/api/UserManagement/ChangePassword"
import Spinner from "../components/common/Spinner";
import CustomizedSnackbars from "../components/common/Snackbar";
import VpnKeyOutlinedIcon from '@mui/icons-material/VpnKeyOutlined';
import IconButton from "@material-ui/core/IconButton";
import Visibility from "@material-ui/icons/Visibility";
import VisibilityOff from "@material-ui/icons/VisibilityOff";
import CustomButton from "../components/common/Button";
import Spinner from "../../components/common/Spinner";
import CustomizedSnackbars from "../../components/common/Snackbar";
import { Visibility, VisibilityOff } from "@mui/icons-material";
import CustomButton from "../../components/common/Button";


const ChangePassword = (props) => {
// const navigate = useNavigate();
const classes = DatasetStyle();

// const dispatch = useDispatch();
const [newPassword, setNewPassword] = useState("")
const [currentPassword, setCurrentPassword] = useState("")
Expand Down Expand Up @@ -71,7 +67,7 @@ import CustomButton from "../components/common/Button";
{loading && <Spinner />}
{/* {renderSnackBar()} */}
<Grid container direction="row" >
<Card className={classes.workspaceCard}>
<Card className="workspaceCard">
<Grid item xs={2} sm={2} md={2} lg={2} xl={2}></Grid>
<Grid item xs={8} sm={8} md={8} lg={8} xl={8} sx={{ pb: "6rem" }}>
<Grid item xs={12} sm={12} md={12} lg={12} xl={12}>
Expand All @@ -85,7 +81,7 @@ import CustomButton from "../components/common/Button";
</Grid> */}

<Grid
className={classes.projectsettingGrid}
className="projectsettingGrid"
items
xs={12}
sm={12}
Expand Down Expand Up @@ -129,7 +125,7 @@ import CustomButton from "../components/common/Button";
md={12}
lg={12}
xl={12}
className={classes.projectsettingGrid}
className="projectsettingGrid"
>
<Typography gutterBottom component="div" label="Required">
New Password
Expand Down Expand Up @@ -165,7 +161,7 @@ import CustomButton from "../components/common/Button";
md={12}
lg={12}
xl={12}
className={classes.projectsettingGrid}
className="projectsettingGrid"
>
<Typography gutterBottom component="div" label="Required">
Confirm Password
Expand Down Expand Up @@ -195,7 +191,7 @@ import CustomButton from "../components/common/Button";
</Grid>

<Grid
className={classes.projectsettingGrid}
className="projectsettingGrid"
item
xs={12}
md={12}
Expand All @@ -212,7 +208,6 @@ import CustomButton from "../components/common/Button";
<Button
sx={{ ml: 2 }}
label={"Cancel"}
onClick={() => navigate(`/projects`)}
/>
</Grid>
</Grid>
Expand Down
Loading