From f54b1a7d098fac76c7ddbccdb9351483466b7b6a Mon Sep 17 00:00:00 2001 From: Nathan Hayfield Date: Fri, 30 Jun 2023 16:18:35 +0200 Subject: [PATCH] adds success colors for statuses in the 200 range (#4314) --- ui/src/components/ErrorPage.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/src/components/ErrorPage.tsx b/ui/src/components/ErrorPage.tsx index a903e558e..d8164162a 100644 --- a/ui/src/components/ErrorPage.tsx +++ b/ui/src/components/ErrorPage.tsx @@ -20,8 +20,7 @@ type PolicyEvaluationTraceDetailsProps = { trace: PolicyEvaluationTrace; } & ListItemProps; const PolicyEvaluationTraceDetails: FC = ({ - trace, - ...props + trace }) => { return ( @@ -52,14 +51,16 @@ export type ErrorPageProps = { export const ErrorPage: FC = ({ data }) => { const traces = data?.policyEvaluationTraces?.filter((trace) => !!trace.id) || []; + const status = data?.status || 500; + return ( - + = 300 ? "error" : "success"}> - {data?.status || 500}{" "} + {status}{" "} {data?.statusText || "Internal Server Error"} {data?.description ? (