mirror of https://github.com/kortix-ai/suna.git
agents use icons and bg color
This commit is contained in:
parent
7af07582ff
commit
f55cc025d7
|
@ -69,7 +69,6 @@ export const AgentPreview = ({ agent, agentMetadata }: AgentPreviewProps) => {
|
|||
return <KortixLogo size={16} />;
|
||||
}
|
||||
if (agent.icon_name) {
|
||||
const DynamicIcon = require('lucide-react/dynamic').DynamicIcon;
|
||||
return (
|
||||
<div
|
||||
className="h-4 w-4 flex items-center justify-center rounded-sm"
|
||||
|
|
|
@ -9,6 +9,7 @@ import { useCreateTemplate, useUnpublishTemplate } from '@/hooks/react-query/sec
|
|||
import { toast } from 'sonner';
|
||||
import { AgentCard } from './custom-agents-page/agent-card';
|
||||
import { KortixLogo } from '../sidebar/kortix-logo';
|
||||
import { DynamicIcon } from 'lucide-react/dynamic';
|
||||
|
||||
interface Agent {
|
||||
agent_id: string;
|
||||
|
@ -107,16 +108,11 @@ const AgentModal: React.FC<AgentModalProps> = ({
|
|||
className="h-16 w-16 rounded-xl flex items-center justify-center"
|
||||
style={{ backgroundColor: agent.icon_background || '#F3F4F6' }}
|
||||
>
|
||||
{(() => {
|
||||
const DynamicIcon = require('lucide-react/dynamic').DynamicIcon;
|
||||
return (
|
||||
<DynamicIcon
|
||||
name={agent.icon_name as any}
|
||||
size={32}
|
||||
color={agent.icon_color || '#000000'}
|
||||
/>
|
||||
);
|
||||
})()}
|
||||
<DynamicIcon
|
||||
name={agent.icon_name as any}
|
||||
size={32}
|
||||
color={agent.icon_color || '#000000'}
|
||||
/>
|
||||
</div>
|
||||
) : agent.profile_image_url ? (
|
||||
<img src={agent.profile_image_url} alt={agent.name} className="h-16 w-16 rounded-xl object-cover" />
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { Download, CheckCircle, Loader2, Globe, GlobeLock, GitBranch, Trash2, MoreVertical, User } from 'lucide-react';
|
||||
import { DynamicIcon } from 'lucide-react/dynamic';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
|
@ -362,7 +363,6 @@ const CardAvatar: React.FC<{
|
|||
}
|
||||
|
||||
if (iconName) {
|
||||
const DynamicIcon = require('lucide-react/dynamic').DynamicIcon;
|
||||
return (
|
||||
<div
|
||||
className="h-14 w-14 flex items-center justify-center rounded-2xl"
|
||||
|
|
Loading…
Reference in New Issue