🐛 Fix theme background and font default selection
This commit is contained in:
@@ -74,7 +74,8 @@ export const ThemeTemplateCard = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const hostBubbleBgColor =
|
const hostBubbleBgColor =
|
||||||
themeTemplate.theme.chat?.hostBubbles ?? defaultTheme.chat.hostBubbles
|
themeTemplate.theme.chat?.hostBubbles?.backgroundColor ??
|
||||||
|
defaultTheme.chat.hostBubbles.backgroundColor
|
||||||
|
|
||||||
const guestAvatar = {
|
const guestAvatar = {
|
||||||
isEnabled:
|
isEnabled:
|
||||||
@@ -84,7 +85,8 @@ export const ThemeTemplateCard = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const guestBubbleBgColor =
|
const guestBubbleBgColor =
|
||||||
themeTemplate.theme.chat?.guestBubbles ?? defaultTheme.chat.guestBubbles
|
themeTemplate.theme.chat?.guestBubbles?.backgroundColor ??
|
||||||
|
defaultTheme.chat.guestBubbles.backgroundColor
|
||||||
|
|
||||||
const buttonBgColor =
|
const buttonBgColor =
|
||||||
themeTemplate.theme.chat?.buttons?.backgroundColor ??
|
themeTemplate.theme.chat?.buttons?.backgroundColor ??
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { isFreePlan } from '@/features/billing/helpers/isFreePlan'
|
|||||||
import { useWorkspace } from '@/features/workspace/WorkspaceProvider'
|
import { useWorkspace } from '@/features/workspace/WorkspaceProvider'
|
||||||
import { ChangePlanModal } from '@/features/billing/components/ChangePlanModal'
|
import { ChangePlanModal } from '@/features/billing/components/ChangePlanModal'
|
||||||
import { useTranslate } from '@tolgee/react'
|
import { useTranslate } from '@tolgee/react'
|
||||||
|
import { defaultTheme } from '@typebot.io/schemas/features/typebot/theme/constants'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
isBrandingEnabled: boolean
|
isBrandingEnabled: boolean
|
||||||
@@ -62,11 +63,11 @@ export const GeneralSettings = ({
|
|||||||
/>
|
/>
|
||||||
</Flex>
|
</Flex>
|
||||||
<FontSelector
|
<FontSelector
|
||||||
activeFont={generalTheme?.font}
|
activeFont={generalTheme?.font ?? defaultTheme.general.font}
|
||||||
onSelectFont={handleSelectFont}
|
onSelectFont={handleSelectFont}
|
||||||
/>
|
/>
|
||||||
<BackgroundSelector
|
<BackgroundSelector
|
||||||
background={generalTheme?.background}
|
background={generalTheme?.background ?? defaultTheme.general.background}
|
||||||
onBackgroundChange={handleBackgroundChange}
|
onBackgroundChange={handleBackgroundChange}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
Reference in New Issue
Block a user