Skip to content

Commit

Permalink
chore(live-preview): bump version and enable it with draft mode (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishelgert authored Jul 28, 2023
1 parent 463a9e2 commit 7cd2b82
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 26 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@contentful/f36-icons": "^4.23.2",
"@contentful/f36-tokens": "^4.0.1",
"@contentful/rich-text-react-renderer": "^15.16.2",
"@contentful/live-preview": "^2.2.1",
"@contentful/live-preview": "^2.6.0",
"@next/bundle-analyzer": "^13.0.4",
"dotenv": "^16.0.3",
"graphql": "^16.6.0",
Expand Down
1 change: 1 addition & 0 deletions src/pages/[slug].page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const getStaticProps: GetStaticProps = async ({ params, locale, draftMode
revalidate: revalidateDuration,
props: {
...(await getServerSideTranslations(locale)),
previewActive: !!preview,
blogPost,
isFeatured,
},
Expand Down
1 change: 1 addition & 0 deletions src/pages/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const getStaticProps: GetStaticProps = async ({ locale, draftMode: previe
return {
revalidate: revalidateDuration,
props: {
previewActive: !!preview,
...(await getServerSideTranslations(locale)),
page,
posts,
Expand Down
47 changes: 22 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1021,13 +1021,6 @@
dependencies:
regenerator-runtime "^0.13.11"

"@babel/runtime@^7.12.5":
version "7.21.5"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.5.tgz#8492dddda9644ae3bda3b45eabe87382caee7200"
integrity sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q==
dependencies:
regenerator-runtime "^0.13.11"

"@babel/template@^7.15.4", "@babel/template@^7.18.10":
version "7.18.10"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71"
Expand Down Expand Up @@ -1097,12 +1090,14 @@
resolved "https://registry.yarnpkg.com/@contentful/f36-tokens/-/f36-tokens-4.0.1.tgz#1b6a2e3fce11a61b84a855dbeed660989259ba54"
integrity sha512-NTyMAQcfvhPP8kJgOK5mtjKpErg799iglEb9B45ii4N7aMdph2GNqgv7KBgpogfbTEGBrlKIoH8MUDSV9YNREg==

"@contentful/live-preview@^2.2.1":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@contentful/live-preview/-/live-preview-2.2.1.tgz#9d0e068f32f4fe5b40f70ca880fee1ef43347c4e"
integrity sha512-5GGTrIyzt81uzsW2E191bLnClNzr2dCl5TmQTLn7UeVJsWnGNGXNjcAPyTtvAn9KrZwkTIAx4IE61pGalBAgsg==
"@contentful/live-preview@^2.6.0":
version "2.6.0"
resolved "https://registry.yarnpkg.com/@contentful/live-preview/-/live-preview-2.6.0.tgz#d45cfb7b4289b3d0b2ecd2663762ca2b9b1ef8f4"
integrity sha512-DfdCUC73m5lL0CZRzQ0rrl7c71hUPkq9C65CiOeF8ZGJbGB5Hgf3j/dHcs+J0cQ1HOLara3uZemU8/OHHOwsGA==
dependencies:
use-deep-compare-effect "^1.8.1"
"@contentful/rich-text-types" "^16.2.0"
"@contentful/visual-sdk" "^1.0.0-alpha.6"
lodash.isequal "^4.5.0"

"@contentful/rich-text-react-renderer@^15.16.2":
version "15.16.2"
Expand All @@ -1116,6 +1111,16 @@
resolved "https://registry.yarnpkg.com/@contentful/rich-text-types/-/rich-text-types-16.0.2.tgz#779bc76b5159152b3a9e908e6a04cb9342faa9b1"
integrity sha512-ovbmCKQjlyGek4NuABoqDesC3FBV3e5jPMMdtT2mpOy9ia31MKO0NSFMRGZu7Q+veZzmDMja8S1i/XeFCUT9Pw==

"@contentful/rich-text-types@^16.2.0":
version "16.2.0"
resolved "https://registry.yarnpkg.com/@contentful/rich-text-types/-/rich-text-types-16.2.0.tgz#5a98cb119340f4da46555216913e96d7ce58df70"
integrity sha512-4BHC+mfa50JB70epzpnas4EkiuB3mGdBZ5Rp8w7R5wXvswEf8TLg5yGau2FxmZeEjrAkDrt4vzBLVQ8v3Y//Jw==

"@contentful/visual-sdk@^1.0.0-alpha.6":
version "1.0.0-alpha.6"
resolved "https://registry.yarnpkg.com/@contentful/visual-sdk/-/visual-sdk-1.0.0-alpha.6.tgz#c7fdfe8eeb72fe04e911b8f2533f68af11cdb980"
integrity sha512-BaddMKKYnVuAYYl409CR2f261Rew5BgA/hncNUGf5f9KrXkN3gSj1Qj6LEmfMjdlTHud8BN+nWktT9M6hBgh/Q==

"@corex/deepmerge@^4.0.29":
version "4.0.29"
resolved "https://registry.yarnpkg.com/@corex/deepmerge/-/deepmerge-4.0.29.tgz#af9debf07d7f6b0d2a9d04a266abf2c1418ed2f6"
Expand Down Expand Up @@ -3448,11 +3453,6 @@ dependency-graph@^0.11.0:
resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.11.0.tgz#ac0ce7ed68a54da22165a85e97a01d53f5eb2e27"
integrity sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==

dequal@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be"
integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==

detect-indent@^6.0.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6"
Expand Down Expand Up @@ -5126,6 +5126,11 @@ lodash.isboolean@^3.0.3:
resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6"
integrity sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==

lodash.isequal@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==

lodash.isinteger@^4.0.4:
version "4.0.4"
resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343"
Expand Down Expand Up @@ -7084,14 +7089,6 @@ use-callback-ref@^1.3.0:
dependencies:
tslib "^2.0.0"

use-deep-compare-effect@^1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/use-deep-compare-effect/-/use-deep-compare-effect-1.8.1.tgz#ef0ce3b3271edb801da1ec23bf0754ef4189d0c6"
integrity sha512-kbeNVZ9Zkc0RFGpfMN3MNfaKNvcLNyxOAAd9O4CBZ+kCBXXscn9s/4I+8ytUER4RDpEYs5+O6Rs4PqiZ+rHr5Q==
dependencies:
"@babel/runtime" "^7.12.5"
dequal "^2.0.2"

use-sidecar@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/use-sidecar/-/use-sidecar-1.1.2.tgz#2f43126ba2d7d7e117aa5855e5d8f0276dfe73c2"
Expand Down

0 comments on commit 7cd2b82

Please sign in to comment.