Skip to content

Commit

Permalink
refactor: remove jwt code logic
Browse files Browse the repository at this point in the history
  • Loading branch information
vanbasten17 committed Sep 23, 2024
1 parent 3ee176b commit 4e98d18
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion packages/botonic-react/src/webchat/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export enum WebchatAction {
TOGGLE_WEBCHAT = 'toggleWebchat',
UPDATE_DEV_SETTINGS = 'updateDevSettings',
UPDATE_HANDOFF = 'updateHandoff',
UPDATE_JWT = 'updateJwt',
UPDATE_LAST_MESSAGE_DATE = 'updateLastMessageDate',
UPDATE_LAST_ROUTE_PATH = 'updateLastRoutePath',
UPDATE_LATEST_INPUT = 'updateLatestInput',
Expand Down
9 changes: 0 additions & 9 deletions packages/botonic-react/src/webchat/hooks/use-webchat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export const webchatInitialState: WebchatState = {
isCustomComponentRendered: false,
lastMessageUpdate: undefined,
currentAttachment: undefined,
jwt: undefined,
numUnreadMessages: 0,
isLastMessageVisible: true,
}
Expand Down Expand Up @@ -177,13 +176,6 @@ export function useWebchat() {
})
}

const updateJwt = (jwt: string) => {
webchatDispatch({
type: WebchatAction.UPDATE_JWT,
payload: jwt,
})
}

const resetUnreadMessages = () => {
webchatDispatch({
type: WebchatAction.RESET_UNREAD_MESSAGES,
Expand Down Expand Up @@ -213,7 +205,6 @@ export function useWebchat() {
toggleWebchat,
updateDevSettings,
updateHandoff,
updateJwt,
updateLastMessageDate,
updateLastRoutePath,
updateLatestInput,
Expand Down
1 change: 0 additions & 1 deletion packages/botonic-react/src/webchat/index-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export interface WebchatState {
isCustomComponentRendered: boolean
lastMessageUpdate?: string
currentAttachment?: File
jwt?: string
numUnreadMessages: number
isLastMessageVisible: boolean
}
Expand Down
2 changes: 0 additions & 2 deletions packages/botonic-react/src/webchat/webchat-reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ export function webchatReducer(
return { ...state, lastRoutePath: action.payload }
case WebchatAction.SET_CURRENT_ATTACHMENT:
return { ...state, currentAttachment: action.payload }
case WebchatAction.UPDATE_JWT:
return { ...state, jwt: action.payload }
default:
return messagesReducer(state, action)
}
Expand Down

0 comments on commit 4e98d18

Please sign in to comment.