From 34b6c16eadd67cc05a415d0989e19a0c70649ada Mon Sep 17 00:00:00 2001 From: Kaosiso Ezealigo Date: Thu, 2 May 2024 14:35:44 +0100 Subject: [PATCH] removed info icon in result component --- .../components/Playground/ViewNavigation.tsx | 9 ++++---- .../ResultComponent/ResultComponent.tsx | 22 ++++++++++++++----- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/agenta-web/src/components/Playground/ViewNavigation.tsx b/agenta-web/src/components/Playground/ViewNavigation.tsx index 079ed7c73c..851525383a 100644 --- a/agenta-web/src/components/Playground/ViewNavigation.tsx +++ b/agenta-web/src/components/Playground/ViewNavigation.tsx @@ -1,5 +1,5 @@ import React, {useEffect, useRef} from "react" -import {Col, Row, Divider, Button, Tooltip, Spin, notification, Result} from "antd" +import {Col, Row, Divider, Button, Tooltip, Spin, notification} from "antd" import TestView from "./Views/TestView" import ParametersView from "./Views/ParametersView" import {useVariant} from "@/lib/hooks/useVariant" @@ -16,6 +16,7 @@ import { } from "@/lib/services/api" import {useAppsData} from "@/contexts/app.context" import {isDemo} from "@/lib/helpers/utils" +import ResultComponent from "../ResultComponent/ResultComponent" interface Props { variant: Variant @@ -104,10 +105,10 @@ const ViewNavigation: React.FC = ({ if (retrying || (!retriedOnce.current && netWorkError)) { return ( - } + spinner={retrying} /> ) } diff --git a/agenta-web/src/components/ResultComponent/ResultComponent.tsx b/agenta-web/src/components/ResultComponent/ResultComponent.tsx index 93bbf0bfbd..16f522ac97 100644 --- a/agenta-web/src/components/ResultComponent/ResultComponent.tsx +++ b/agenta-web/src/components/ResultComponent/ResultComponent.tsx @@ -1,16 +1,28 @@ -import {Result, Spin} from "antd" -import {ResultStatusType} from "antd/es/result" -import React from "react" +import {CloseCircleFilled} from "@ant-design/icons" +import {Result, Spin, Typography} from "antd" +import React, {ReactNode} from "react" +const {Title} = Typography interface ResultComponentProps { - status: ResultStatusType + status: ReactNode title: string subtitle?: string spinner?: boolean } const ResultComponent: React.FC = ({status, title, subtitle, spinner}) => { - return } /> + return ( + } + title={ + + {title} + + } + subTitle={subtitle} + extra={spinner && } + /> + ) } export default ResultComponent