Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove jwt code logic #2905

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading