Skip to content

Commit

Permalink
Fixed provider refresh on navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Jun 11, 2021
1 parent 7744a80 commit f72977c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ui/src/app/core/components/UserConfirmation.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import Modal from 'react-bootstrap/Modal';
import Button from 'react-bootstrap/Button';
import Translate from '../../i18n/components/translate';
import { useHistory } from 'react-router-dom';


export function UserConfirmation({children}) {
Expand All @@ -19,9 +20,15 @@ export function UserConfirmation({children}) {
}

export function ConfirmWindow ({message, confirm, setConfirm, confirmCallback}) {

const history = useHistory();

const allowTransition = () => {
setConfirm(false);
confirmCallback(true);
if (history.location.pathname.includes('provider/new')) {
window.location.reload();
}
}

const blockTransition = () => {
Expand Down

0 comments on commit f72977c

Please sign in to comment.