Skip to content

Commit e15aa49

Browse files
committed
wip
1 parent d38a969 commit e15aa49

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

packages/botonic-react/src/components/webchat-settings.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const WebchatSettings = ({
4949
return null
5050
}
5151
const renderNode = () => {
52-
const updatedTheme = normalizeWebchatSettings({
52+
const updatedSettings = normalizeWebchatSettings({
5353
theme,
5454
blockInputs,
5555
persistentMenu,
@@ -64,9 +64,9 @@ export const WebchatSettings = ({
6464
<message
6565
type={INPUT.WEBCHAT_SETTINGS}
6666
settings={stringifyWithRegexs({
67-
theme: updatedTheme,
67+
theme: updatedSettings.updatedTheme,
6868
user,
69-
handoffState,
69+
handoffState: updatedSettings.updatedHandoffState,
7070
})}
7171
/>
7272
)

packages/botonic-react/src/webchat/webchat.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,9 @@ const Webchat = forwardRef<WebchatRef | null, WebchatProps>((props, ref) => {
474474
https://stackoverflow.com/questions/37949981/call-child-method-from-parent
475475
*/
476476

477-
const updateSessionWithUser = (userToUpdate: any) =>
477+
const updateSessionWithUser = (userToUpdate: any) => {
478478
updateSession(merge(webchatState.session, { user: userToUpdate }))
479+
}
479480

480481
useImperativeHandle(ref, () => ({
481482
addBotResponse: ({ response, session, lastRoutePath }) => {
@@ -501,8 +502,8 @@ const Webchat = forwardRef<WebchatRef | null, WebchatProps>((props, ref) => {
501502
const isHandoff = action.startsWith(BotonicAction.CreateCase)
502503
if (isHandoff && isDev) {
503504
addMessageComponent(<Handoff />)
505+
// TODO: Review after minimum time, handoff component disappears because of an empty message component
504506
}
505-
// TODO: Review after minimum time, handoff component disappears because of an empty message component
506507
updateHandoffState({
507508
...webchatState.handoffState,
508509
isHandoff,
@@ -756,7 +757,7 @@ const Webchat = forwardRef<WebchatRef | null, WebchatProps>((props, ref) => {
756757
{webchatState.isPersistentMenuOpen && (
757758
<DarkenBackground component={persistentMenu()} />
758759
)}
759-
760+
{/* TODO: Review this condition */}
760761
{!webchatState.handoffState.isHandoff && userInputEnabled && (
761762
<InputPanel
762763
persistentMenu={props.persistentMenu}

0 commit comments

Comments
 (0)