Skip to content

Commit

Permalink
Implement PasswordChange dialog -> Account.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
gnmyt committed Aug 30, 2024
1 parent c427a78 commit cac99fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/src/pages/Settings/pages/Account/Account.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ import { UserContext } from "@/common/contexts/UserContext.jsx";
import Button from "@/common/components/Button";
import { patchRequest, postRequest } from "@/common/utils/RequestUtil.js";
import TwoFactorAuthentication from "@/pages/Settings/pages/Account/dialogs/TwoFactorAuthentication";
import PasswordChange from "@/pages/Settings/pages/Account/dialogs/PasswordChange";

export const Account = () => {

const [twoFactorOpen, setTwoFactorOpen] = useState(false);
const [passwordChangeOpen, setPasswordChangeOpen] = useState(false);

const { user, login } = useContext(UserContext);

Expand Down Expand Up @@ -50,6 +52,7 @@ export const Account = () => {
return (
<div className="account-page">
<TwoFactorAuthentication open={twoFactorOpen} onClose={() => setTwoFactorOpen(false)} />
<PasswordChange open={passwordChangeOpen} onClose={() => setPasswordChangeOpen(false)} />
<div className="account-section">
<h2>Account name</h2>
<div className="section-inner">
Expand Down Expand Up @@ -89,7 +92,7 @@ export const Account = () => {
<div className="section-inner">
<p style={{ maxWidth: "25rem" }}>Choose a new and secure password for your account here.</p>

<Button text="Change password" />
<Button text="Change password" onClick={() => setPasswordChangeOpen(true)} />
</div>
</div>

Expand Down

0 comments on commit cac99fd

Please sign in to comment.