Skip to content

Commit

Permalink
remove nested array
Browse files Browse the repository at this point in the history
  • Loading branch information
yomybaby committed Oct 28, 2024
1 parent a44ff11 commit 557beb9
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions react/src/components/lablupTalkativotUI/LLMChatCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,21 +166,19 @@ const LLMChatCard: React.FC<LLMChatCardProps> = ({
}, [submitKey]);

const items: MenuProps['items'] = filterEmptyItem([
showCompareMenuItem && [
{
key: 'compare',
label: t('chatui.CompareWithOtherModels'),
icon: <Scale />,
onClick: () => {
webuiNavigate(
`/serving?tab=chatting&endpointId=${endpointId}&modelId=${modelId}`,
);
},
},
{
type: 'divider',
showCompareMenuItem && {
key: 'compare',
label: t('chatui.CompareWithOtherModels'),
icon: <Scale />,
onClick: () => {
webuiNavigate(
`/serving?tab=chatting&endpointId=${endpointId}&modelId=${modelId}`,
);
},
],
},
showCompareMenuItem && {
type: 'divider',
},
{
key: 'clear',
danger: true,
Expand Down

0 comments on commit 557beb9

Please sign in to comment.