Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion components/cards/AgentCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export const AgentCard = ({
community,
author,
project,
members,
onAddToHome,
isOnHome,
tags,
shortIntro
}: any) => {
Expand All @@ -43,6 +44,19 @@ export const AgentCard = ({
</div>
}

const ActionsSection = () => {
return <div className={`w-full flex flex-row justify-center mt-4 mb-4`}>
<button
onClick={onAddToHome}
className={`${readexPro.className} text-nowrap text-sm md:text-md shrink-0 hover:opacity-80 border-cyan font-medium border px-2 py-2 shadow-early-access-button shrink-0 flex flex-row items-center text-white`}>
<DynamicIcon name={isOnHome() ? 'PlayIcon' : 'SquaresPlusIcon'} width={24} height={24} className='text-primary mr-3'/>
{ isOnHome() ? `Open App` : `Add to Home` }
</button>
</div>
}



const CardAuthor = () => {
if (!author) {
if (community) {
Expand Down Expand Up @@ -74,6 +88,7 @@ export const AgentCard = ({
<div className={`${highlight ? '' : 'hidden'} badge badge-success badge-xs animate-pulse text-[#8BC34A] mr-2`}/>
{ title }
</h4>
<ActionsSection/>
</div>
<div className='flex flex-col w-full items-start lg:mt-0 mt-2'>
<div onClick={onPress} className="flex flex-col p-4 border bg-black/50 lg:ml-4 border-primary/20 min-h-screen leading-normal text-center w-full">
Expand Down
5 changes: 3 additions & 2 deletions components/cards/HomeItemCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ProfileHeaderPlaceholder } from '~/components/placeholders/ProfileHeader'
import { readexPro } from '~/elements/fonts'
import { BannerImage, CompositeImage, Engagements, DynamicIcon, SimpleAvatar, Community, Animation, Author, People, Tags, LargeAvatar } from '~/elements';
import { getImageUrl } from '~/utils/main';
import { getImageUrl, getCompositeImageUrl } from '~/utils/main';
import Image from 'next/image';

const MAX_TITLE = 80
Expand All @@ -11,6 +11,7 @@ export const HomeItemCard = ({
onPress,
isLoading,
title,
team,
banner,
avatar,
username,
Expand Down Expand Up @@ -82,7 +83,7 @@ export const HomeItemCard = ({
}

return <div onClick={onPress} className={`cursor-pointer flex flex-col justify-start`}>
<LargeAvatar src={getImageUrl(username)}/>
<LargeAvatar src={team ? getCompositeImageUrl(team.collection, team.owner) : getImageUrl(username)}/>
<div className={`${readexPro.className} mt-1 text-sm text-center`}>
{ title }
</div>
Expand Down
12 changes: 12 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ const nextConfig = {
{
source: "/app/:id([a-z0-9_-]+)/:path*",
destination: "https://carmel-app-:id.vercel.app/app/:id/:path*"
},
{
source: "/agent/:id([a-z0-9_-]+)/",
destination: "https://carmel-agent-main.vercel.app/agent/main/:id/"
},
{
source: "/agent/:id([a-z0-9_-]+)",
destination: "https://carmel-agent-main.vercel.app/agent/main/:id"
},
{
source: "/agent/:id([a-z0-9_-]+)/:path*",
destination: "https://carmel-agent-main.vercel.app/agent/main/:id/:path*"
}
]
},
Expand Down
Loading