diff --git a/apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/[blueprint_slug]/blueprint-playground.client.tsx b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/[blueprint_slug]/blueprint-playground.client.tsx index deef1889cd6..971582ab032 100644 --- a/apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/[blueprint_slug]/blueprint-playground.client.tsx +++ b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/[blueprint_slug]/blueprint-playground.client.tsx @@ -16,7 +16,6 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; -import { Separator } from "@/components/ui/separator"; import { ToolTipLabel } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; import { zodResolver } from "@hookform/resolvers/zod"; @@ -422,8 +421,32 @@ function RequestConfigSection(props: { path: string; supportedChainIds: number[]; }) { - const pathVariables = props.parameters.filter((param) => param.in === "path"); - const queryParams = props.parameters.filter((param) => param.in === "query"); + const { pathVariables, queryParams, filterQueryParams } = useMemo(() => { + const pathVariables: OpenAPIV3.ParameterObject[] = []; + const queryParams: OpenAPIV3.ParameterObject[] = []; + const filterQueryParams: OpenAPIV3.ParameterObject[] = []; + + for (const param of props.parameters) { + if (param.in === "path") { + pathVariables.push(param); + } + + if (param.in === "query") { + if (param.name.startsWith("filter_")) { + filterQueryParams.push(param); + } else { + queryParams.push(param); + } + } + } + + return { + pathVariables, + queryParams, + filterQueryParams, + }; + }, [props.parameters]); + const showError = !props.form.formState.isValid && props.form.formState.isDirty && @@ -451,10 +474,9 @@ function RequestConfigSection(props: { /> )} - {pathVariables.length > 0 && queryParams.length > 0 && } - {queryParams.length > 0 && ( )} + + {filterQueryParams.length > 0 && ( + + )} ); @@ -479,10 +513,11 @@ function ParameterSection(props: { domain: string; path: string; supportedChainIds: number[]; + className?: string; }) { const url = `${props.domain}${props.path}`; return ( -
+

{props.title}

{props.parameters.map((param, i) => {