Skip to content

Commit

Permalink
feat: updates background color in client-preview
Browse files Browse the repository at this point in the history
  • Loading branch information
aatbip committed Oct 1, 2024
1 parent 9563c02 commit b932295
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/app/client-preview/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { z } from 'zod'
import { CopilotAPI } from '@/utils/copilotApiUtils'
import InvalidToken from '../components/InvalidToken'
import { defaultState } from '../../../defaultState'
import { defaultBannerImagePath } from '@/utils/constants'
import { defaultBannerImagePath, defaultBgColor } from '@/utils/constants'

export const revalidate = 0

Expand Down Expand Up @@ -61,7 +61,7 @@ export default async function ClientPreviewPage({

let settings: ISettings = {
content: defaultState,
backgroundColor: '#f7f8fa',
backgroundColor: defaultBgColor,
id: '',
bannerImage: {
id: '',
Expand Down
3 changes: 2 additions & 1 deletion src/app/components/ClientPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { defaultState } from '../../../defaultState'
import useSWR from 'swr'
import { fetcher } from '@/utils/fetcher'
import { IframeExtension } from '@/components/tiptap/iframe/ext_iframe'
import { defaultBgColor } from '@/utils/constants'

const ClientPreview = ({
content,
Expand Down Expand Up @@ -134,7 +135,7 @@ const ClientPreview = ({
appState?.toggleReadOnly(true)
const _settings = {
content: defaultState,
backgroundColor: '#f7f8fa',
backgroundColor: defaultBgColor,
id: '',
bannerImage: {
id: '',
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/EditorInterface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import { defaultState } from '../../../defaultState'
import Image from 'next/image'
import { Box } from '@mui/material'
import { Delete } from '@mui/icons-material'
import { defaultBannerImagePath } from '@/utils/constants'
import { defaultBannerImagePath, defaultBgColor } from '@/utils/constants'
import { AutofillExtension } from '@/components/tiptap/autofieldSelector/ext_autofill'
import { NotificationWidgetExtension } from '@/components/tiptap/notificationWidget/ext_notification_widget'
import { useAppDataContext } from '@/hooks/useAppData'
Expand Down Expand Up @@ -264,7 +264,7 @@ const EditorInterface = ({ settings, token, font }: IEditorInterface) => {
if (token) {
const _settings: ISettings = {
content: defaultState,
backgroundColor: '#f7f8fa',
backgroundColor: defaultBgColor,
id: '',
bannerImage: {
id: '',
Expand Down
2 changes: 2 additions & 0 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ export const staticAutofillValues = [
]

export const defaultBannerImagePath = '/images/default_bg.jpg'

export const defaultBgColor = '#f7f8fa'

0 comments on commit b932295

Please sign in to comment.