Remove unused imports and simplify message handling in search page

This commit is contained in:
zaidmukaddam 2024-11-06 20:42:01 +05:30
parent 36dd5112bf
commit b248ecbba9

View File

@ -46,7 +46,6 @@ import {
Heart, Heart,
X, X,
MapPin, MapPin,
Star,
Plus, Plus,
Download, Download,
Flame, Flame,
@ -58,12 +57,9 @@ import {
Calendar, Calendar,
Calculator, Calculator,
ImageIcon, ImageIcon,
Paperclip,
ChevronDown, ChevronDown,
Zap,
Edit2, Edit2,
ChevronUp, ChevronUp,
Camera,
Moon Moon
} from 'lucide-react'; } from 'lucide-react';
import { import {
@ -1418,7 +1414,7 @@ GPT-4o has been re-enabled! You can use it by selecting the model from the dropd
}, []); }, []);
const memoizedMessages = useMemo(() => messages, [messages]); // const memoizedMessages = useMemo(() => messages, [messages]);
return ( return (
<div className="flex flex-col font-sans items-center justify-center p-2 sm:p-4 bg-background text-foreground transition-all duration-500"> <div className="flex flex-col font-sans items-center justify-center p-2 sm:p-4 bg-background text-foreground transition-all duration-500">
@ -1472,7 +1468,7 @@ GPT-4o has been re-enabled! You can use it by selecting the model from the dropd
<div className="space-y-4 sm:space-y-6 mb-32"> <div className="space-y-4 sm:space-y-6 mb-32">
{memoizedMessages.map((message, index) => ( {messages.map((message, index) => (
<div key={index}> <div key={index}>
{message.role === 'user' && ( {message.role === 'user' && (
<motion.div <motion.div