l-min-components 1.7.1378 → 1.7.1380
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ const Error404 = ({ btnText, fallbackPath, isDashboard }) => (
|
|
|
10
10
|
isDashboard={isDashboard}
|
|
11
11
|
/>
|
|
12
12
|
);
|
|
13
|
-
const Error403 = ({ btnText, fallbackPath }) => (
|
|
13
|
+
const Error403 = ({ btnText, fallbackPath, isDashboard }) => (
|
|
14
14
|
<ErrorWrapper
|
|
15
15
|
subTitle="Sorry, you don’t have permission to access this page."
|
|
16
16
|
message="If you believe this is a mistake, please contact the site administrator or check if you have the correct login credentials."
|
|
@@ -20,7 +20,7 @@ const Error403 = ({ btnText, fallbackPath }) => (
|
|
|
20
20
|
isDashboard={isDashboard}
|
|
21
21
|
/>
|
|
22
22
|
);
|
|
23
|
-
const Error500 = ({ btnText, fallbackPath }) => (
|
|
23
|
+
const Error500 = ({ btnText, fallbackPath, isDashboard }) => (
|
|
24
24
|
<ErrorWrapper
|
|
25
25
|
subTitle="Something went wrong"
|
|
26
26
|
message="We’re so sorry about that! Our tech team is already on the case. Please try again later."
|
|
@@ -30,7 +30,7 @@ const Error500 = ({ btnText, fallbackPath }) => (
|
|
|
30
30
|
isDashboard={isDashboard}
|
|
31
31
|
/>
|
|
32
32
|
);
|
|
33
|
-
const Error503 = ({ btnText, fallbackPath }) => (
|
|
33
|
+
const Error503 = ({ btnText, fallbackPath, isDashboard }) => (
|
|
34
34
|
<ErrorWrapper
|
|
35
35
|
subTitle=""
|
|
36
36
|
message="It'll be back up and running in a jiffy. Try again later."
|
|
@@ -110,7 +110,7 @@ function ErrorBoundary({
|
|
|
110
110
|
|
|
111
111
|
function ErrorComponent({ fallbackPath, btnText, isDashboard = false }) {
|
|
112
112
|
const params = new URLSearchParams(window.location.search);
|
|
113
|
-
const errorParam = params.get("error");
|
|
113
|
+
const errorParam = params.get("error-status");
|
|
114
114
|
|
|
115
115
|
if (errorParam === "_403_")
|
|
116
116
|
return (
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { useCallback } from "react";
|
|
2
|
-
|
|
3
1
|
export default function useCustomNavigate() {
|
|
4
|
-
return
|
|
2
|
+
return (path, { replace = false, state = null } = {}) => {
|
|
5
3
|
const historyState = { ...state };
|
|
6
4
|
|
|
7
5
|
if (replace) {
|
|
@@ -11,5 +9,5 @@ export default function useCustomNavigate() {
|
|
|
11
9
|
}
|
|
12
10
|
|
|
13
11
|
window.dispatchEvent(new PopStateEvent("popstate"));
|
|
14
|
-
}
|
|
12
|
+
};
|
|
15
13
|
}
|