I have a cancel button it should not update the data into database and it should refresh my page,but in my case page is not refreshing
<Button onClick={() => searchDiagnosisCode()}>Cancel</Button>
const searchDiagnosisCode = () => {
props.setConfirm(true);
setTimeout(function () {
props.history.push({
pathname: '/DiagnosisCodeSearch',
editPage: true,
});
}, 10);
};