@@ -10,28 +10,28 @@ import RenderComponents from "../components/RenderComponents";
1010import { addEditableTags , isLiveEditTagsEnabled } from "../helper" ;
1111import { PageProps } from "../typescript/template" ;
1212import ContentstackLivePreview from "@contentstack/live-preview-utils" ;
13- import { ContentstackGatsby } from "gatsby-source-contentstack/live-preview"
13+ import { ContentstackGatsby } from "gatsby-source-contentstack/live-preview" ;
1414
1515const blogPost = ( {
1616 data : { contentstackBlogPost, contentstackPage } ,
1717} : PageProps ) => {
18- ContentstackGatsby . addContentTypeUidFromTypename ( contentstackBlogPost )
19- isLiveEditTagsEnabled && addEditableTags ( contentstackBlogPost , "blog_post" )
18+ ContentstackGatsby . addContentTypeUidFromTypename ( contentstackBlogPost ) ;
19+ isLiveEditTagsEnabled && addEditableTags ( contentstackBlogPost , "blog_post" ) ;
2020 const [ getEntry , setEntry ] = useState ( {
2121 banner : contentstackPage ,
2222 post : contentstackBlogPost ,
2323 } ) ;
2424
2525 const fetchLivePreviewData = async ( ) => {
2626 const updatedData = await getCSData . get ( contentstackBlogPost ) ;
27- isLiveEditTagsEnabled && addEditableTags ( updatedData , "blog_post" )
28- setEntry ( ( prev ) => ( { ...prev , post : updatedData } ) )
29- }
27+ isLiveEditTagsEnabled && addEditableTags ( updatedData , "blog_post" ) ;
28+ setEntry ( prev => ( { ...prev , post : updatedData } ) ) ;
29+ } ;
3030
3131 useEffect ( ( ) => {
3232 const callbackId = ContentstackLivePreview . onLiveEdit ( fetchLivePreviewData ) ;
3333 return ( ) => ContentstackLivePreview . unsubscribeOnEntryChange ( callbackId ) ;
34- } , [ ] )
34+ } , [ ] ) ;
3535
3636 return (
3737 < Layout blogPost = { getEntry . post } banner = { getEntry . banner } >
@@ -78,7 +78,7 @@ const blogPost = ({
7878export const postQuery = graphql `
7979 query ($title: String!) {
8080 contentstackBlogPost(title: { eq: $title }) {
81- __typename
81+ cslp__meta
8282 url
8383 title
8484 body
@@ -93,7 +93,7 @@ export const postQuery = graphql`
9393 }
9494 }
9595 related_post {
96- __typename
96+
9797 uid
9898 body
9999 url
@@ -110,7 +110,7 @@ export const postQuery = graphql`
110110 contentstackPage(url: { eq: "/blog" }) {
111111 title
112112 url
113- __typename
113+ cslp__meta
114114 uid
115115 locale
116116 seo {
@@ -129,7 +129,7 @@ export const postQuery = graphql`
129129 title_h2
130130 featured_blogs {
131131 title
132- __typename
132+
133133 uid
134134 url
135135 is_archived
0 commit comments