mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix: use proper state object
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
PopoverAnchor,
|
||||
} from "@/components/ui/popover";
|
||||
import { PublishAgentSelect } from "../PublishAgentSelect";
|
||||
import { PublishAgentInfo } from "../PublishAgentSelectInfo";
|
||||
import { PublishAgentInfo, PublishAgentInfoInitialData } from "../PublishAgentSelectInfo";
|
||||
import { PublishAgentAwaitingReview } from "../PublishAgentAwaitingReview";
|
||||
import { Button } from "../Button";
|
||||
import {
|
||||
@@ -45,17 +45,16 @@ export const PublishAgentPopout: React.FC<PublishAgentPopoutProps> = ({
|
||||
);
|
||||
const [myAgents, setMyAgents] = React.useState<MyAgentsResponse | null>(null);
|
||||
const [selectedAgent, setSelectedAgent] = React.useState<string | null>(null);
|
||||
const [initialData, setInitialData] = React.useState<{
|
||||
agent_id: string;
|
||||
title: string;
|
||||
subheader: string;
|
||||
slug: string;
|
||||
thumbnailSrc: string;
|
||||
youtubeLink: string;
|
||||
category: string;
|
||||
description: string;
|
||||
additionalImages?: string[];
|
||||
} | null>(null);
|
||||
const [initialData, setInitialData] = React.useState<PublishAgentInfoInitialData>({
|
||||
agent_id: "",
|
||||
title: "",
|
||||
subheader: "",
|
||||
slug: "",
|
||||
thumbnailSrc: "",
|
||||
youtubeLink: "",
|
||||
category: "",
|
||||
description: "",
|
||||
});
|
||||
const [publishData, setPublishData] =
|
||||
React.useState<StoreSubmissionRequest>(submissionData);
|
||||
const [selectedAgentId, setSelectedAgentId] = React.useState<string | null>(
|
||||
|
||||
Reference in New Issue
Block a user