mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-09-25 08:35:42 +02:00
Update
This commit is contained in:
@@ -18,7 +18,6 @@ import { useMutation, useQuery } from '@tanstack/react-query';
|
||||
import { queryClient } from '../../stores/query-client';
|
||||
import { billingDetailsOptions } from '../../queries/billing';
|
||||
import { useToast } from '../../hooks/use-toast';
|
||||
import { readStream } from '../../lib/ai';
|
||||
import { markdownToHtml } from '../../lib/markdown';
|
||||
import { ChatHistory } from './ChatHistory';
|
||||
import { PersonalizedResponseForm } from './PersonalizedResponseForm';
|
||||
@@ -444,7 +443,7 @@ export function AIChat(props: AIChatProps) {
|
||||
<div className="pointer-events-auto flex items-center justify-between gap-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<LockIcon className="size-4" strokeWidth={2.5} />
|
||||
<p>Upgrade to Pro to keep your conversations.</p>
|
||||
<p>Your chat history is not saved.</p>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
|
@@ -68,6 +68,7 @@ export function AIChatHistory(props: AIChatHistoryProps) {
|
||||
|
||||
setChatHistoryId(undefined);
|
||||
window.history.replaceState(null, '', '/ai/chat');
|
||||
setKeyTrigger((key) => key + 1);
|
||||
},
|
||||
[chatHistoryId],
|
||||
);
|
||||
@@ -76,7 +77,6 @@ export function AIChatHistory(props: AIChatHistoryProps) {
|
||||
|
||||
const hasError = chatHistoryError || billingDetailsError;
|
||||
|
||||
// derived UI states to make JSX clearer
|
||||
const showLoader = isChatHistoryLoading && !hasError;
|
||||
const showError = !isChatHistoryLoading && Boolean(hasError);
|
||||
|
||||
|
@@ -37,6 +37,7 @@ export function ListChatHistory(props: ListChatHistoryProps) {
|
||||
useLayoutEffect(() => {
|
||||
const deviceType = getTailwindScreenDimension();
|
||||
const isMediumSize = ['sm', 'md'].includes(deviceType);
|
||||
|
||||
setIsOpen(!isMediumSize);
|
||||
setIsMobile(isMediumSize);
|
||||
}, []);
|
||||
@@ -148,7 +149,7 @@ export function ListChatHistory(props: ListChatHistoryProps) {
|
||||
</div>
|
||||
|
||||
<button
|
||||
className="flex w-full items-center justify-center gap-2 rounded-lg bg-black p-2 text-sm text-white"
|
||||
className="flex w-full items-center hover:opacity-80 justify-center gap-2 rounded-lg bg-black p-2 text-sm text-white"
|
||||
onClick={() => {
|
||||
if (isMobile) {
|
||||
setIsOpen(false);
|
||||
|
Reference in New Issue
Block a user