mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
getting dashboard working
This commit is contained in:
@@ -84,7 +84,6 @@ export default async function Page({
|
||||
imageSrc: submission.image_urls[0] || '',
|
||||
dateSubmitted: new Date(submission.date_submitted).toLocaleDateString(),
|
||||
status: submission.status.toLowerCase() as StatusType,
|
||||
onEdit: () => {},
|
||||
})) || []} />
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -52,7 +52,7 @@ export default async function Page({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center p-4">
|
||||
<div className="flex flex-col items-center justify-center px-4">
|
||||
<ProfileInfoForm profile={profile as CreatorDetails} />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// AgentTable.tsx
|
||||
"use client";
|
||||
|
||||
import * as React from "react";
|
||||
import { AgentTableRow, AgentTableRowProps } from "./AgentTableRow";
|
||||
import { AgentTableCard } from "./AgentTableCard";
|
||||
@@ -37,7 +38,9 @@ export const AgentTable: React.FC<AgentTableProps> = ({ agents }) => {
|
||||
<div className="text-sm font-medium text-neutral-800">
|
||||
Date submitted
|
||||
</div>
|
||||
<div className="text-sm font-medium text-neutral-800">Status</div>
|
||||
<div className="text-sm font-medium text-neutral-800">
|
||||
Status
|
||||
</div>
|
||||
<div className="text-right text-sm font-medium text-neutral-800">
|
||||
Runs
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// AgentCard.tsx
|
||||
"use client";
|
||||
|
||||
import * as React from "react";
|
||||
import Image from "next/image";
|
||||
import { IconStarFilled, IconMore } from "@/components/ui/icons";
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import * as React from "react";
|
||||
import Image from "next/image";
|
||||
import { Button } from "./Button";
|
||||
@@ -80,7 +82,7 @@ export const AgentTableRow: React.FC<AgentTableRowProps> = ({
|
||||
|
||||
{/* Runs column */}
|
||||
<div className="text-right text-sm text-neutral-600">
|
||||
{runs?.toLocaleString() ?? "—"}
|
||||
{runs?.toLocaleString() ?? "0"}
|
||||
</div>
|
||||
|
||||
{/* Reviews column */}
|
||||
@@ -93,7 +95,7 @@ export const AgentTableRow: React.FC<AgentTableRowProps> = ({
|
||||
<IconStarFilled className="h-4 w-4 text-neutral-800" />
|
||||
</div>
|
||||
) : (
|
||||
<span className="text-sm text-neutral-600">—</span>
|
||||
<span className="text-sm text-neutral-600">No reviews</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ export const ProfileInfoForm = ({ profile }: { profile: CreatorDetails }) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="w-full min-w-[600px] p-4 sm:p-8">
|
||||
<div className="w-full min-w-[600px] px-4 sm:px-8">
|
||||
<h1 className="mb-6 font-['Poppins'] text-[28px] font-medium text-neutral-900 dark:text-neutral-100 sm:mb-8 sm:text-[35px]">
|
||||
Profile
|
||||
</h1>
|
||||
|
||||
@@ -37,8 +37,15 @@ const statusConfig: Record<
|
||||
};
|
||||
|
||||
export const Status: React.FC<StatusProps> = ({ status }) => {
|
||||
if (!status || !statusConfig[status]) {
|
||||
return null;
|
||||
/**
|
||||
* Status component displays a badge with a colored dot and text indicating the agent's status
|
||||
* @param status - The current status of the agent
|
||||
* Valid values: 'draft', 'awaiting_review', 'approved', 'rejected'
|
||||
*/
|
||||
if (!status) {
|
||||
return <Status status="awaiting_review" />;
|
||||
} else if (!statusConfig[status]) {
|
||||
return <Status status="awaiting_review" />;
|
||||
}
|
||||
|
||||
const config = statusConfig[status];
|
||||
|
||||
Reference in New Issue
Block a user