fix: replace navigate with hardgoto in showUser (#37363)
* fix: use hardGoTo in ShowUser * refactor: clean up hardGoTo Rather than using both navigate and hardGoTo this imports hardGoTo as navigate and uses navigate everywhere Co-authored-by: mrugesh <1884376+raisedadead@users.noreply.github.com>
This commit is contained in:
committed by
mrugesh
parent
78b6fd1adf
commit
0e143c2caf
@@ -5,7 +5,7 @@ import { createSelector } from 'reselect';
|
||||
import { navigate as gatsbyNavigate } from 'gatsby';
|
||||
import { Button } from '@freecodecamp/react-bootstrap';
|
||||
|
||||
import { hardGoTo, isSignedInSelector } from '../../../redux';
|
||||
import { hardGoTo as navigate, isSignedInSelector } from '../../../redux';
|
||||
import { apiLocation } from '../../../../config/env.json';
|
||||
|
||||
import { gtagReportConversion } from '../../../analytics/gtag';
|
||||
@@ -18,9 +18,9 @@ const mapStateToProps = createSelector(
|
||||
isSignedIn
|
||||
})
|
||||
);
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
navigate: location => dispatch(hardGoTo(location))
|
||||
});
|
||||
const mapDispatchToProps = {
|
||||
navigate
|
||||
};
|
||||
|
||||
const createOnClick = (navigate, isSignedIn) => e => {
|
||||
e.preventDefault();
|
||||
|
Reference in New Issue
Block a user