Skip to content

Commit 9a5969a

Browse files
authored
Merge pull request #4002 from yugalkaushik/fix-reloading
Fix: reloading https://editor.p5js.org/account shows a small glimpse of the password reset page
2 parents 135f400 + 1fa2082 commit 9a5969a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

client/modules/User/pages/AccountView.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { useEffect } from 'react';
22
import { useDispatch, useSelector } from 'react-redux';
33
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
44
import { Helmet } from 'react-helmet';
@@ -17,6 +17,7 @@ import { hideErrorModal } from '../../IDE/actions/ide';
1717
import { Overlay } from '../../App/components/Overlay';
1818
import Toast from '../../IDE/components/Toast';
1919
import { RootState } from '../../../reducers';
20+
import { resetPasswordReset } from '../actions';
2021

2122
function SocialLoginPanel() {
2223
const { t } = useTranslation();
@@ -50,6 +51,10 @@ function SocialLoginPanel() {
5051
export function AccountView() {
5152
const { t } = useTranslation();
5253
const dispatch = useDispatch();
54+
55+
useEffect(() => {
56+
dispatch(resetPasswordReset());
57+
}, [dispatch]);
5358
const location = useLocation();
5459
const queryParams = parse(location.search);
5560
const showError = !!queryParams.error;

0 commit comments

Comments
 (0)