From 3120602d6aa4749361c9a8b31fec81cc3f91b9d0 Mon Sep 17 00:00:00 2001 From: David Shin <42793498+dncc89@users.noreply.github.com> Date: Tue, 16 May 2023 00:51:58 +0900 Subject: [PATCH] feat: Add user icon in messages (#275) * Update GPT4 model icon * Add user icon support in messages --- client/src/utils/getIcon.jsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/client/src/utils/getIcon.jsx b/client/src/utils/getIcon.jsx index 74390dc405..9304264062 100644 --- a/client/src/utils/getIcon.jsx +++ b/client/src/utils/getIcon.jsx @@ -3,25 +3,28 @@ import React from 'react'; import { twMerge } from 'tailwind-merge'; import GPTIcon from '../components/svg/GPTIcon'; import BingIcon from '../components/svg/BingIcon'; +import { useAuthContext } from '~/hooks/AuthContext'; const getIcon = props => { // { size = 30, isCreatedByUser, model, chatGptLabel, error, ...props } const { size = 30, isCreatedByUser, button, model } = props; + const { user, logout } = useAuthContext(); if (isCreatedByUser) return (