@ludo.ninja/components 2.1.30 → 2.1.31
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.
|
@@ -18,15 +18,16 @@ const Header = () => {
|
|
|
18
18
|
const isSignedIn = (0, store_1.useUserStore)((state) => state.isSignedIn);
|
|
19
19
|
const getUser = (0, store_1.useUserStore)((state) => state.user);
|
|
20
20
|
const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
|
|
21
|
+
const isProd = (0, env_1.useEnvStore)((state) => state.isProd);
|
|
21
22
|
const openSidebar = (0, ui_1.useUiStore)((state) => state.openSidebar);
|
|
22
23
|
const redirectToLoginWindow = (0, auth_1.useRedirectToLoginWindow)();
|
|
23
24
|
return ((0, jsx_runtime_1.jsx)(header_1.Header, { isAuthorized: isSignedIn, handle: {
|
|
24
25
|
login: redirectToLoginWindow,
|
|
25
26
|
openSidebar,
|
|
26
27
|
}, slots: {
|
|
27
|
-
headerExpLabel: ((0, jsx_runtime_1.jsx)(headerExperienceLabel_1.default, { userId: getUser?.userId ||
|
|
28
|
-
headerUserPick: (0, jsx_runtime_1.jsx)(headerUserPic_1.default, { userId: getUser?.userId ||
|
|
29
|
-
logoLinkComponent: ({ children }) => (0, jsx_runtime_1.jsx)(link_1.default, { href: ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"], children: children }),
|
|
28
|
+
headerExpLabel: ((0, jsx_runtime_1.jsx)(headerExperienceLabel_1.default, { userId: getUser?.userId || "" })),
|
|
29
|
+
headerUserPick: (0, jsx_runtime_1.jsx)(headerUserPic_1.default, { userId: getUser?.userId || "" }),
|
|
30
|
+
logoLinkComponent: ({ children }) => (0, jsx_runtime_1.jsx)(link_1.default, { href: ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE][isProd() ? "profile" : "app"], children: children }),
|
|
30
31
|
} }));
|
|
31
32
|
};
|
|
32
33
|
// Export
|
|
@@ -27,7 +27,7 @@ const HeaderSearch = () => {
|
|
|
27
27
|
}, slots: {
|
|
28
28
|
headerExpLabel: ((0, jsx_runtime_1.jsx)(headerExperienceLabel_1.default, { userId: getUser?.userId || '' })),
|
|
29
29
|
headerUserPick: (0, jsx_runtime_1.jsx)(headerUserPic_1.default, { userId: getUser?.userId || '' }),
|
|
30
|
-
logoLinkComponent: ({ children }) => (0, jsx_runtime_1.jsx)("a", { href: ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"], children: children }),
|
|
30
|
+
logoLinkComponent: ({ children }) => (0, jsx_runtime_1.jsx)("a", { href: ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE][isProd() ? "profile" : "app"], children: children }),
|
|
31
31
|
searchInput: ({ setInputFocused }) => {
|
|
32
32
|
// Todo seacrh pages, hide search input from header
|
|
33
33
|
return isProd() ? undefined : ((0, jsx_runtime_1.jsx)(searchSimpleInput_1.default, { onFocusHandler: setInputFocused }));
|
|
@@ -71,7 +71,8 @@ const HeaderSimple = () => {
|
|
|
71
71
|
};
|
|
72
72
|
const scrollDirection = (0, utils_1.useScrollDirection)();
|
|
73
73
|
const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
|
|
74
|
-
|
|
74
|
+
const isProd = (0, env_1.useEnvStore)((state) => state.isProd);
|
|
75
|
+
return ((0, jsx_runtime_1.jsx)(StyledHeaderSimple, { className: scrollDirection, children: (0, jsx_runtime_1.jsx)("div", { className: 'logo', children: (0, jsx_runtime_1.jsx)("a", { href: ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE][isProd() ? "profile" : "app"], children: renderDesktopLogoOrMobile() }) }) }));
|
|
75
76
|
};
|
|
76
77
|
// Export
|
|
77
78
|
exports.default = HeaderSimple;
|