fix: remove messageHeader click when endpoint is browser

This commit is contained in:
Danny Avila 2023-04-05 14:05:54 -04:00
parent e7a6589958
commit 60f51dfeeb

View file

@ -1,6 +1,7 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { useRecoilValue } from 'recoil'; import { useRecoilValue } from 'recoil';
import EndpointOptionsDialog from '../Endpoints/EndpointOptionsDialog'; import EndpointOptionsDialog from '../Endpoints/EndpointOptionsDialog';
import { cn } from '~/utils/';
import { Button } from '../ui/Button.tsx'; import { Button } from '../ui/Button.tsx';
import store from '~/store'; import store from '~/store';
@ -49,8 +50,11 @@ const MessageHeader = ({ isSearchView = false }) => {
return ( return (
<> <>
<div <div
className="dark:text-gray-450 w-full cursor-pointer gap-1 border-b border-black/10 bg-gray-50 text-sm text-gray-500 transition-all hover:bg-gray-100 hover:bg-opacity-30 dark:border-gray-900/50 dark:bg-gray-700 dark:hover:bg-gray-600 dark:hover:bg-opacity-100" className={cn(
onClick={() => setSaveAsDialogShow(true)} 'dark:text-gray-450 w-full gap-1 border-b border-black/10 bg-gray-50 text-sm text-gray-500 transition-all hover:bg-gray-100 hover:bg-opacity-30 dark:border-gray-900/50 dark:bg-gray-700 dark:hover:bg-gray-600 dark:hover:bg-opacity-100',
endpoint === 'chatGPTBrowser' ? '' : 'cursor-pointer '
)}
onClick={() => (endpoint === 'chatGPTBrowser' ? null : setSaveAsDialogShow(true))}
> >
<div className="d-block flex w-full items-center justify-center p-3">{getConversationTitle()}</div> <div className="d-block flex w-full items-center justify-center p-3">{getConversationTitle()}</div>
</div> </div>