@ludo.ninja/components 2.1.33 → 2.1.35
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.
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Page404SPA = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const _404_svg_1 = __importDefault(require("../../public/404/404"));
|
|
10
|
+
const colors_1 = require("@ludo.ninja/ui/build/styles/colors");
|
|
11
|
+
const ScreenWidth_1 = require("../../styles/ScreenWidth");
|
|
12
|
+
const MainButton_1 = __importDefault(require("@ludo.ninja/ui/build/system/Buttons/MainButton"));
|
|
13
|
+
const Box_1 = require("@ludo.ninja/ui/build/system/Box");
|
|
14
|
+
const Flex_1 = require("@ludo.ninja/ui/build/system/Flex");
|
|
15
|
+
// Styles
|
|
16
|
+
const StyledNotFoundPage = styled_components_1.default.div `
|
|
17
|
+
.notFoundContent {
|
|
18
|
+
.notFoundCaption {
|
|
19
|
+
font-weight: 700;
|
|
20
|
+
font-size: 3.8em;
|
|
21
|
+
line-height: 1.37em;
|
|
22
|
+
color: ${colors_1.TextGrayColor};
|
|
23
|
+
margin-bottom: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.notFoundIcon {
|
|
27
|
+
width: 337px;
|
|
28
|
+
height: 329px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
${ScreenWidth_1.mediaQuery.tablet} {
|
|
32
|
+
flex-direction: column-reverse;
|
|
33
|
+
|
|
34
|
+
.notFoundText {
|
|
35
|
+
margin: 40px 0 0 0;
|
|
36
|
+
text-align: center;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.notFoundIcon {
|
|
40
|
+
width: 286px;
|
|
41
|
+
height: 280px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.notFoundCaption {
|
|
45
|
+
font-size: 3em;
|
|
46
|
+
line-height: 1.6em;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
${ScreenWidth_1.mediaQuery.phone} {
|
|
51
|
+
.notFoundIcon {
|
|
52
|
+
width: 218px;
|
|
53
|
+
height: 212px;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
58
|
+
// Component
|
|
59
|
+
const Page404SPA = ({ redirectToHomePage }) => {
|
|
60
|
+
return ((0, jsx_runtime_1.jsx)(StyledNotFoundPage, { children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "notFoundContent", justifyContent: "center", alignItems: "center", children: [(0, jsx_runtime_1.jsxs)(Box_1.Box, { mr: 140, className: "notFoundText", children: [(0, jsx_runtime_1.jsxs)("h1", { className: "notFoundCaption", children: ["Whoops! ", (0, jsx_runtime_1.jsx)("br", {}), " No results found"] }), (0, jsx_runtime_1.jsx)(Box_1.Box, { mt: "36px", children: (0, jsx_runtime_1.jsx)(MainButton_1.default, { onClick: redirectToHomePage, variant: "primaryL", text: "Go to Main page" }) })] }), (0, jsx_runtime_1.jsx)(Box_1.Box, { children: (0, jsx_runtime_1.jsx)("div", { className: "notFoundIcon", children: (0, jsx_runtime_1.jsx)(_404_svg_1.default, {}) }) })] }) }));
|
|
61
|
+
};
|
|
62
|
+
exports.Page404SPA = Page404SPA;
|
|
@@ -5,58 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const router_1 = require("next/router");
|
|
8
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
const _404_svg_1 = __importDefault(require("../../public/404/404"));
|
|
10
|
-
const colors_1 = require("@ludo.ninja/ui/build/styles/colors");
|
|
11
|
-
const ScreenWidth_1 = require("../../styles/ScreenWidth");
|
|
12
8
|
const mainLayout_1 = __importDefault(require("../../layouts/custom/mainLayout"));
|
|
13
|
-
const MainButton_1 = __importDefault(require("../../system/Buttons/MainButton"));
|
|
14
|
-
const index_1 = require("../../system/index");
|
|
15
9
|
const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
|
|
16
10
|
const env_1 = require("../../store/env");
|
|
17
|
-
|
|
18
|
-
const StyledNotFoundPage = styled_components_1.default.div `
|
|
19
|
-
.notFoundContent {
|
|
20
|
-
.notFoundCaption {
|
|
21
|
-
font-weight: 700;
|
|
22
|
-
font-size: 3.8em;
|
|
23
|
-
line-height: 1.37em;
|
|
24
|
-
color: ${colors_1.TextGrayColor};
|
|
25
|
-
margin-bottom: 0;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.notFoundIcon {
|
|
29
|
-
width: 337px;
|
|
30
|
-
height: 329px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
${ScreenWidth_1.mediaQuery.tablet} {
|
|
34
|
-
flex-direction: column-reverse;
|
|
35
|
-
|
|
36
|
-
.notFoundText {
|
|
37
|
-
margin: 40px 0 0 0;
|
|
38
|
-
text-align: center;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.notFoundIcon {
|
|
42
|
-
width: 286px;
|
|
43
|
-
height: 280px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.notFoundCaption {
|
|
47
|
-
font-size: 3em;
|
|
48
|
-
line-height: 1.6em;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
${ScreenWidth_1.mediaQuery.phone} {
|
|
53
|
-
.notFoundIcon {
|
|
54
|
-
width: 218px;
|
|
55
|
-
height: 212px;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
`;
|
|
11
|
+
const Page404SPA_1 = require("./Page404SPA");
|
|
60
12
|
// Component
|
|
61
13
|
const Page404 = () => {
|
|
62
14
|
const router = (0, router_1.useRouter)();
|
|
@@ -67,9 +19,9 @@ const Page404 = () => {
|
|
|
67
19
|
router.push("/");
|
|
68
20
|
}
|
|
69
21
|
else {
|
|
70
|
-
window.open(appDomain,
|
|
22
|
+
window.open(appDomain, "_self");
|
|
71
23
|
}
|
|
72
24
|
};
|
|
73
|
-
return ((0, jsx_runtime_1.jsx)(mainLayout_1.default, { children: (0, jsx_runtime_1.jsx)(
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(mainLayout_1.default, { children: (0, jsx_runtime_1.jsx)(Page404SPA_1.Page404SPA, { redirectToHomePage: redirectToHomePage }) }));
|
|
74
26
|
};
|
|
75
27
|
exports.default = Page404;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function useApollo(pageProps: AppProps["pageProps"]): import("@apollo/client").ApolloClient<import("@apollo/client").NormalizedCacheObject>;
|
|
1
|
+
export declare function useApollo(pageProps?: any): import("@apollo/client").ApolloClient<import("@apollo/client").NormalizedCacheObject>;
|
|
@@ -12,11 +12,11 @@ function useApollo(pageProps) {
|
|
|
12
12
|
NEXT_PUBLIC_ENV_VALUE: state.NEXT_PUBLIC_ENV_VALUE,
|
|
13
13
|
NEXT_PUBLIC_ENV_DOMAIN: state.NEXT_PUBLIC_ENV_DOMAIN,
|
|
14
14
|
}));
|
|
15
|
-
const state = pageProps[graphql_1.APOLLO_STATE_PROP_NAME];
|
|
15
|
+
const state = pageProps?.[graphql_1.APOLLO_STATE_PROP_NAME] || null;
|
|
16
16
|
return (0, react_1.useMemo)(() => api_1.graphqlConfig.createErrorAuthInterceptor(api_1.graphqlConfig.initializeApollo(state, NEXT_PUBLIC_ENV_DOMAIN), () => {
|
|
17
17
|
api_1.authCookies.destroyCookies(NEXT_PUBLIC_ENV_DOMAIN);
|
|
18
|
-
(0, nookies_1.destroyCookie)(null,
|
|
19
|
-
path:
|
|
18
|
+
(0, nookies_1.destroyCookie)(null, "authMultiversXWallet", {
|
|
19
|
+
path: "/",
|
|
20
20
|
domain: NEXT_PUBLIC_ENV_DOMAIN,
|
|
21
21
|
});
|
|
22
22
|
window.location.replace(`${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["welcome"]}?alertError=authServerError`);
|