Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(market): Handle empty agents response #8393

Merged
Show file tree
Hide file tree
Changes from 2 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
19 changes: 16 additions & 3 deletions autogpt_platform/frontend/src/app/marketplace/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const AgentCard: React.FC<{ agent: Agent; featured?: boolean }> = ({
{agent.description}
</p>
<div className="mb-2 text-xs text-gray-400">
Categories: {agent.categories.join(", ")}
Categories: {agent.categories?.join(", ")}
</div>
</div>
<div className="flex items-end justify-between">
Expand Down Expand Up @@ -315,14 +315,27 @@ const Marketplace: React.FC = () => {
)
) : (
<>
{featuredAgents.length > 0 && (
{featuredAgents?.length > 0 ? (
<AgentGrid
agents={featuredAgents}
title="Featured Agents"
featured={true}
/>
) : (
<div className="py-12 text-center">
<p className="text-gray-600">No Featured Agents found</p>
</div>
)}

<hr />

{topAgents?.length > 0 ? (
<AgentGrid agents={topAgents} title="Top Downloaded Agents" />
) : (
<div className="py-12 text-center">
<p className="text-gray-600">No Top Downloaded Agents found</p>
</div>
)}
<AgentGrid agents={topAgents} title="Top Downloaded Agents" />
<Pagination
page={topAgentsPage}
totalPages={topAgentsTotalPages}
Expand Down
2 changes: 1 addition & 1 deletion autogpt_platform/market/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ ENABLE_AUTH=true
SUPABASE_JWT_SECRET=our-super-secret-jwt-token-with-at-least-32-characters-long
BACKEND_CORS_ALLOW_ORIGINS="http://localhost:3000,http://127.0.0.1:3000"

APP_ENV=local
APP_ENV=local
2 changes: 1 addition & 1 deletion autogpt_platform/supabase
aarushik93 marked this conversation as resolved.
Show resolved Hide resolved
Submodule supabase updated 968 files
Loading