@prezly/theme-kit-nextjs 6.3.0 → 6.3.1-alpha.0
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.
|
@@ -11,7 +11,7 @@ function getGalleryAlbumPageServerSideProps(customProps) {
|
|
|
11
11
|
const { api, serverSideProps } = await (0, getNewsroomServerSideProps_1.getNewsroomServerSideProps)(context);
|
|
12
12
|
const { uuid } = context.params;
|
|
13
13
|
const gallery = await api.getGallery(uuid);
|
|
14
|
-
if (!gallery ||
|
|
14
|
+
if (!gallery || isGalleryEmpty(gallery)) {
|
|
15
15
|
return { notFound: true };
|
|
16
16
|
}
|
|
17
17
|
return (0, processRequest_1.processRequest)(context, {
|
|
@@ -29,7 +29,7 @@ function getGalleryAlbumPageStaticProps(customProps) {
|
|
|
29
29
|
const { api, staticProps } = await (0, getNewsroomStaticProps_1.getNewsroomStaticProps)(context);
|
|
30
30
|
const { uuid } = context.params;
|
|
31
31
|
const gallery = await api.getGallery(uuid);
|
|
32
|
-
if (!gallery ||
|
|
32
|
+
if (!gallery || isGalleryEmpty(gallery)) {
|
|
33
33
|
return { notFound: true };
|
|
34
34
|
}
|
|
35
35
|
return (0, processStaticRequest_1.processStaticRequest)(context, {
|
|
@@ -52,4 +52,7 @@ async function getGalleryAlbumPageStaticPaths() {
|
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
exports.getGalleryAlbumPageStaticPaths = getGalleryAlbumPageStaticPaths;
|
|
55
|
+
function isGalleryEmpty(gallery) {
|
|
56
|
+
return gallery.images_number === 0 && gallery.videos_number === 0;
|
|
57
|
+
}
|
|
55
58
|
//# sourceMappingURL=galleryAlbum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"galleryAlbum.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/galleryAlbum.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"galleryAlbum.js","sourceRoot":"","sources":["../../../src/ad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,EAAE,IAAI,EAAE,CAAC;SAC7B;QAED,OAAO,IAAA,2CAAoB,EAAC,OAAO,EAAE;YACjC,GAAG,WAAW;YACd,OAAO;YACP,GAAG,CAAC,OAAO,WAAW,KAAK,UAAU;gBACjC,CAAC,CAAC,MAAO,WAAiE,CACpE,OAAO,EACP,WAAW,CACd;gBACH,CAAC,CAAC,WAAW,CAAC;SACrB,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AA1BD,wEA0BC;AAEM,KAAK,UAAU,8BAA8B;IAChD,MAAM,GAAG,GAAG,IAAA,gCAAgB,GAAE,CAAC;IAC/B,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAEjD,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IAElE,OAAO;QACH,KAAK;QACL,QAAQ,EAAE,UAAU;KACvB,CAAC;AACN,CAAC;AAVD,wEAUC;AAED,SAAS,cAAc,CAAC,OAAwB;IAC5C,OAAO,OAAO,CAAC,aAAa,KAAK,CAAC,IAAI,OAAO,CAAC,aAAa,KAAK,CAAC,CAAC;AACtE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prezly/theme-kit-nextjs",
|
|
3
|
-
"version": "6.3.0",
|
|
3
|
+
"version": "6.3.1-alpha.0",
|
|
4
4
|
"description": "Data layer and utility library for developing Prezly themes with NextJS",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -75,11 +75,11 @@
|
|
|
75
75
|
"next-seo": "^5.4.0"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@sentry/nextjs": "7.
|
|
78
|
+
"@sentry/nextjs": "7.57.0"
|
|
79
79
|
},
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
83
|
"sideEffects": false,
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "03380945f387f7d856b445addf9179380047fca5"
|
|
85
85
|
}
|