update chat role icon (#378)
This commit is contained in:
parent
b7732a95a6
commit
83e25b97b0
|
@ -1,5 +1,5 @@
|
||||||
import { Message } from '@/types/chat';
|
import { Message } from '@/types/chat';
|
||||||
import { IconCheck, IconCopy, IconEdit } from '@tabler/icons-react';
|
import { IconCheck, IconCopy, IconEdit, IconUser, IconRobot } from '@tabler/icons-react';
|
||||||
import { useTranslation } from 'next-i18next';
|
import { useTranslation } from 'next-i18next';
|
||||||
import { FC, memo, useEffect, useRef, useState } from 'react';
|
import { FC, memo, useEffect, useRef, useState } from 'react';
|
||||||
import rehypeMathjax from 'rehype-mathjax';
|
import rehypeMathjax from 'rehype-mathjax';
|
||||||
|
@ -81,7 +81,7 @@ export const ChatMessage: FC<Props> = memo(
|
||||||
>
|
>
|
||||||
<div className="relative m-auto flex gap-4 p-4 text-base md:max-w-2xl md:gap-6 md:py-6 lg:max-w-2xl lg:px-0 xl:max-w-3xl">
|
<div className="relative m-auto flex gap-4 p-4 text-base md:max-w-2xl md:gap-6 md:py-6 lg:max-w-2xl lg:px-0 xl:max-w-3xl">
|
||||||
<div className="min-w-[40px] text-right font-bold">
|
<div className="min-w-[40px] text-right font-bold">
|
||||||
{message.role === 'assistant' ? t('AI') : t('You')}:
|
{message.role === 'assistant' ? <IconRobot size={30}/> : <IconUser size={30}/>}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="prose mt-[-2px] w-full dark:prose-invert">
|
<div className="prose mt-[-2px] w-full dark:prose-invert">
|
||||||
|
|
Loading…
Reference in New Issue