Skip to content

Commit d1b42f8

Browse files
🎨 dont show draft mode toolbar (#3818)
1 parent e3ffbdc commit d1b42f8

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

web/app/[locale]/(pages)/[...slug]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ export default async function Page({ params }: Props) {
9999
pageContent = pageResults
100100

101101
if (isDraftMode) {
102-
//Later when inside presentation tool, cant clean as it doesnt work with visual editing, must filter props together with visual editing,
103-
console.log('Clean page data for stega')
102+
//Later when inside presentation tool, cant clea globally as it doesnt work with visual editing,
103+
// must filter props together with visual editing,but is a big job.
104104
pageContent = stegaClean(pageResults)
105105
}
106106

web/app/[locale]/layout.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,15 @@ export default async function LocaleLayout({
8080
{t('skipToContent') ?? 'Skip to main content'}
8181
</NextLink>
8282
<SanityLive />
83-
{isPreview && (
83+
{/* Preview link is sent to stakeholders dont show draft toolbar, only use if needed in local development
84+
Must first filter all conditional rendering props in the page content, otherwise the visual editing will not work correctly inside presentation tool. This is a big job and will be done later. For now, we will not render the visual editing inside the presentation tool.
85+
*/}
86+
{/* {isPreview && (
8487
<>
8588
<DraftModeToolbar />
86-
{/* Must first filter all conditional rendering props in the page content, otherwise the visual editing will not work correctly inside presentation tool. This is a big job and will be done later. For now, we will not render the visual editing inside the presentation tool.
87-
<ConditionalVisualEditing /> */}
89+
<ConditionalVisualEditing />
8890
</>
89-
)}
91+
)} */}
9092
<NextIntlClientProvider>
9193
<PageProvider initialErrorImage={errorImage}>{children}</PageProvider>
9294
<Footer {...footerData} />

web/sections/FullWidthVideo/FullWidthVideo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import dynamic from 'next/dynamic'
22
import type { PortableTextBlock } from 'next-sanity'
33
import type { AspectRatioVariants } from '@/core/VideoJsPlayer/Video'
4-
import { type VideoType } from '@/core/VideoJsPlayer/VideoPlayer'
4+
import type { VideoType } from '@/core/VideoJsPlayer/VideoPlayer'
55
import type { DesignOptions, LinkData } from '../../types/index'
66

77
export type FullWidthVideoRatio = 'fullScreen' | 'narrow' | '2:1'

0 commit comments

Comments
 (0)