@ludo.ninja/components 2.1.28 → 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.
- package/build/api/server-galleries/queries/useFetchMyFavorites/index.js +3 -0
- package/build/api/server-galleries/queries/useFetchMyGalleries/index.js +3 -0
- package/build/api/server-search/queries/useFindUserCreations/index.js +3 -0
- package/build/components/headers/header/index.js +4 -3
- package/build/components/headers/headerSearch/index.js +1 -1
- package/build/components/headers/headerSimple/index.js +2 -1
- package/build/hooks/likes/dynamic/useFindCollectionsAndLikes.js +3 -0
- package/build/hooks/likes/dynamic/useFindCreationsAndLikes.js +3 -0
- package/build/hooks/likes/dynamic/useGetCreationsAndLikesByType.js +3 -0
- package/package.json +1 -1
|
@@ -45,6 +45,9 @@ const useFetchMyFavoritesV2 = () => {
|
|
|
45
45
|
try {
|
|
46
46
|
const { data } = await fetchMore({
|
|
47
47
|
variables: { pageToken },
|
|
48
|
+
updateQuery: (previousQueryResult) => {
|
|
49
|
+
return previousQueryResult;
|
|
50
|
+
},
|
|
48
51
|
});
|
|
49
52
|
const { galleries, nextPageToken } = data.fetchMyFavoritesV2;
|
|
50
53
|
if (galleries) {
|
|
@@ -47,6 +47,9 @@ const useFetchMyGalleriesV2 = () => {
|
|
|
47
47
|
try {
|
|
48
48
|
const { data } = await fetchMore({
|
|
49
49
|
variables: { pageToken },
|
|
50
|
+
updateQuery: (previousQueryResult) => {
|
|
51
|
+
return previousQueryResult;
|
|
52
|
+
},
|
|
50
53
|
});
|
|
51
54
|
const { galleries, nextPageToken } = data.fetchMyGalleriesV2;
|
|
52
55
|
if (galleries) {
|
|
@@ -65,6 +65,9 @@ const useFindUserCreations = ({ ownerId, input, scrollTab, }) => {
|
|
|
65
65
|
size: limit,
|
|
66
66
|
},
|
|
67
67
|
},
|
|
68
|
+
updateQuery: (previousQueryResult) => {
|
|
69
|
+
return previousQueryResult;
|
|
70
|
+
},
|
|
68
71
|
});
|
|
69
72
|
const { creations: nextCreations, ...nextPage } = data.findUserCreations;
|
|
70
73
|
setCreations((prevCreations) => [
|
|
@@ -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;
|
|
@@ -131,6 +131,9 @@ const useFindCollectionsAndLikes = ({ term, input, page, }) => {
|
|
|
131
131
|
input,
|
|
132
132
|
page,
|
|
133
133
|
},
|
|
134
|
+
updateQuery: (previousQueryResult) => {
|
|
135
|
+
return previousQueryResult;
|
|
136
|
+
},
|
|
134
137
|
});
|
|
135
138
|
const { collections: nextCollections, ...nextPage } = data.findCollections;
|
|
136
139
|
const nextList = nextCollections.map((collectionAsset) => new CollectionCreationEntity_1.default({
|
|
@@ -108,6 +108,9 @@ const useFindCreationsAndLikes = ({ term, input, page, }) => {
|
|
|
108
108
|
...(page && 'size' in page ? { size: page.size } : {}),
|
|
109
109
|
},
|
|
110
110
|
},
|
|
111
|
+
updateQuery: (previousQueryResult) => {
|
|
112
|
+
return previousQueryResult;
|
|
113
|
+
},
|
|
111
114
|
});
|
|
112
115
|
const { creations: nextCreations, ...nextPage } = data.findCreations;
|
|
113
116
|
setCreations((prevCreations) => [
|
|
@@ -135,6 +135,9 @@ const useGetCreationsAndLikesByType = ({ itemType, page, }) => {
|
|
|
135
135
|
...(page && 'size' in page ? { size: page.size } : {}),
|
|
136
136
|
},
|
|
137
137
|
},
|
|
138
|
+
updateQuery: (previousQueryResult) => {
|
|
139
|
+
return previousQueryResult;
|
|
140
|
+
},
|
|
138
141
|
});
|
|
139
142
|
const { creations: nextCreations, ...token } = data.fetchCreationsByType;
|
|
140
143
|
setAllCreations((prevCreations) => [
|