@@ -23,13 +23,15 @@ export const ThemeSideMenu = () => {
|
||||
const { typebot, updateTypebot } = useTypebot()
|
||||
|
||||
const updateChatTheme = (chat: ChatTheme) =>
|
||||
typebot && updateTypebot({ theme: { ...typebot.theme, chat } })
|
||||
typebot && updateTypebot({ updates: { theme: { ...typebot.theme, chat } } })
|
||||
|
||||
const updateGeneralTheme = (general: GeneralTheme) =>
|
||||
typebot && updateTypebot({ theme: { ...typebot.theme, general } })
|
||||
typebot &&
|
||||
updateTypebot({ updates: { theme: { ...typebot.theme, general } } })
|
||||
|
||||
const updateCustomCss = (customCss: string) =>
|
||||
typebot && updateTypebot({ theme: { ...typebot.theme, customCss } })
|
||||
typebot &&
|
||||
updateTypebot({ updates: { theme: { ...typebot.theme, customCss } } })
|
||||
|
||||
const selectedTemplate = (
|
||||
selectedTemplate: Partial<Pick<ThemeTemplate, 'id' | 'theme'>>
|
||||
@@ -37,15 +39,19 @@ export const ThemeSideMenu = () => {
|
||||
if (!typebot) return
|
||||
const { theme, id } = selectedTemplate
|
||||
updateTypebot({
|
||||
selectedThemeTemplateId: id,
|
||||
theme: theme ? { ...theme } : typebot.theme,
|
||||
updates: {
|
||||
selectedThemeTemplateId: id,
|
||||
theme: theme ? { ...theme } : typebot.theme,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
const updateBranding = (isBrandingEnabled: boolean) =>
|
||||
typebot &&
|
||||
updateTypebot({
|
||||
settings: { ...typebot.settings, general: { isBrandingEnabled } },
|
||||
updates: {
|
||||
settings: { ...typebot.settings, general: { isBrandingEnabled } },
|
||||
},
|
||||
})
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user