Skip to content

Commit

Permalink
fix(boxai-sidebar): Fix typo in avatarURL name
Browse files Browse the repository at this point in the history
  • Loading branch information
jankowiakdawid committed Dec 22, 2024
1 parent 5106779 commit c80a39f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/elements/content-sidebar/BoxAISidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface BoxAISidebarContextValues {
elementId: string,
recordAction: (params: RecordActionType) => void,
setCacheValue: (key: 'encodedSession' | 'questions', value: string | null | QuestionType[]) => void,
userInfo: { name: string, avatarUrl: string },
userInfo: { name: string, avatarURL: string },
};

export const BoxAISidebarContext = React.createContext<BoxAISidebarContextValues>({
Expand All @@ -27,7 +27,7 @@ export const BoxAISidebarContext = React.createContext<BoxAISidebarContextValues
elementId: '',
recordAction: noop,
setCacheValue: noop,
userInfo: { name: '', avatarUrl: ''},
userInfo: { name: '', avatarURL: ''},
});

export interface BoxAISidebarProps {
Expand Down Expand Up @@ -62,7 +62,7 @@ export interface BoxAISidebarProps {
isResetChatEnabled: boolean,
isStopResponseEnabled: boolean,
isStreamingEnabled: boolean,
userInfo: { name: '', avatarUrl: ''},
userInfo: { name: string, avatarURL: string},
recordAction: (params: RecordActionType) => void,
setCacheValue: (key: 'encodedSession' | 'questions', value: string | null | QuestionType[]) => void,
}
Expand Down
7 changes: 5 additions & 2 deletions src/elements/content-sidebar/SidebarPanels.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ class SidebarPanels extends React.Component<Props, State> {

versionsSidebar: ElementRefType = React.createRef();

boxAiSidebarCache: { encodedSession?: string | null, questions?: QuestionType[] } = { encodedSession: null, questions: [] };
boxAiSidebarCache: { encodedSession?: string | null, questions?: QuestionType[] } = {
encodedSession: null,
questions: [],
};

componentDidMount() {
this.setState({ isInitialized: true });
Expand Down Expand Up @@ -266,7 +269,7 @@ class SidebarPanels extends React.Component<Props, State> {
hasSidebarInitialized={isInitialized}
ref={this.boxAISidebar}
startMarkName={MARK_NAME_JS_LOADING_BOXAI}
userInfo={{name: currentUser?.name, avatarUrl: currentUser?.avatar_url}}
userInfo={{ name: currentUser?.name, avatarURL: currentUser?.avatar_url }}
cache={this.boxAiSidebarCache}
setCacheValue={this.setBoxAiSidebarCacheValue}
{...boxAISidebarProps}
Expand Down

0 comments on commit c80a39f

Please sign in to comment.