From 82387e95da11b0e43619f2ae793ebebcedc754f5 Mon Sep 17 00:00:00 2001 From: mbecker20 Date: Wed, 3 Apr 2024 01:24:13 -0700 Subject: [PATCH] periphery secrets in dep env working --- .../config/components/environment.tsx | 35 ++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/resources/deployment/config/components/environment.tsx b/frontend/src/components/resources/deployment/config/components/environment.tsx index 54a4654b5..9b6c27e14 100644 --- a/frontend/src/components/resources/deployment/config/components/environment.tsx +++ b/frontend/src/components/resources/deployment/config/components/environment.tsx @@ -4,7 +4,7 @@ import { env_to_text, text_to_env } from "@lib/utils"; import { Types } from "@monitor/client"; import { Button } from "@ui/button"; import { Textarea } from "@ui/textarea"; -import { useEffect, useState } from "react"; +import { RefObject, createRef, useEffect, useState } from "react"; export const EnvVars = ({ vars, @@ -16,6 +16,7 @@ export const EnvVars = ({ /// eg server id server?: string; }) => { + const ref = createRef(); const [env, setEnv] = useState(env_to_text(vars)); useEffect(() => { !!env && set({ environment: text_to_env(env) }); @@ -26,8 +27,11 @@ export const EnvVars = ({ label="Environment Variables" className="flex-col gap-4 items-start" > - {server && } + {server && ( + + )}