Add replace true to remaining methods
This commit is contained in:
1 parent
9eb92903ad
commit
92142395cc
3 files changed
+4
-4
No files matched your search
@@ -109,12 +109,12 @@ const Configure = () => {
|
||||
const data = monitors.find((monitor) => monitor._id === monitorId);
|
||||
if (!data) {
|
||||
console.error("Error fetching monitor of id: " + monitorId);
|
||||
navigate("/not-found");
|
||||
navigate("/not-found", { replace: true });
|
||||
}
|
||||
setMonitor({
|
||||
...data,
|
||||
});
|
||||
}, [monitorId, authToken, monitors]);
|
||||
}, [monitorId, authToken, monitors, navigate]);
|
||||
|
||||
const handleChange = (event, name) => {
|
||||
let { value, id } = event.target;
|
||||
|
||||
@@ -93,7 +93,7 @@ const PageSpeedConfigure = () => {
|
||||
const data = monitors.find((monitor) => monitor._id === monitorId);
|
||||
if (!data) {
|
||||
console.error("Error fetching pagespeed monitor of id: " + monitorId);
|
||||
navigate("/not-found");
|
||||
navigate("/not-found", { replace: true });
|
||||
}
|
||||
setMonitor({
|
||||
...data,
|
||||
|
||||
@@ -211,7 +211,7 @@ const PageSpeedDetails = () => {
|
||||
setAudits(res?.data?.data?.checks?.[0]?.audits ?? []);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
navigate("/not-found");
|
||||
navigate("/not-found", { replace: true });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user