Skip to content

Commit

Permalink
perf : 代码细节优化
Browse files Browse the repository at this point in the history
大神, 学习代码过程中发现的一个小小的点,887行已定义`const isUser = message.role === "user";`,此处可直接用isUser
  • Loading branch information
chushanxue authored Jun 30, 2023
1 parent 0ec4cc2 commit 3120087
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ export function Chat() {
}}
></IconButton>
</div>
{message.role === "user" ? (
{isUser ? (
<Avatar avatar={config.avatar} />
) : (
<MaskAvatar mask={session.mask} />
Expand Down

0 comments on commit 3120087

Please sign in to comment.