Skip to content

Commit

Permalink
feat: 修复 UserIcon 为空的 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xcatliu committed Nov 17, 2023
1 parent 565e35e commit 857bced
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 deletions.
6 changes: 3 additions & 3 deletions app/components/Message.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use client';

import { UserIcon } from '@heroicons/react/24/outline';
import classNames from 'classnames';
import Image from 'next/image';
import type { FC, ReactNode } from 'react';
Expand All @@ -20,7 +21,6 @@ import { getContent, getRole } from '@/utils/message';
import { disableScroll, scrollToTop } from '@/utils/scroll';

import { ChatGPTIcon } from './icons/ChatGPTIcon';
import { HeroiconsUser } from './icons/HeroiconsUser';

/**
* 单个消息气泡
Expand Down Expand Up @@ -119,7 +119,7 @@ export const MessageContentItemTextComp: FC<
})}
/>
) : (
<HeroiconsUser className="rounded w-10 h-10 p-1.5 bg-white dark:bg-gray-200" />
<UserIcon className="rounded w-10 h-10 p-1.5 text-black bg-white dark:bg-gray-200" />
)}
<div
className={classNames('relative mx-3 px-3 py-2 max-w-[calc(100%-6rem)] rounded break-words', {
Expand Down Expand Up @@ -172,7 +172,7 @@ export const MessageContentItemImageUrlComp: FC<
})}
/>
) : (
<HeroiconsUser className="rounded w-10 h-10 p-1.5 bg-white dark:bg-gray-200" />
<UserIcon className="rounded w-10 h-10 p-1.5 text-black bg-white dark:bg-gray-200" />
)}
<Image
src={image_url.url}
Expand Down
21 changes: 0 additions & 21 deletions app/components/icons/HeroiconsUser.tsx

This file was deleted.

1 comment on commit 857bced

@vercel
Copy link

@vercel vercel bot commented on 857bced Nov 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

chatgpt-next – ./

chatgpt-next-git-main-xcatliu.vercel.app
chatgpt-next-xcatliu.vercel.app

Please sign in to comment.