Skip to content

Commit

Permalink
Merge pull request #57 from modelcontextprotocol/justin/fix-env-vars
Browse files Browse the repository at this point in the history
Fix typing environment variable keys
  • Loading branch information
jspahrsummers authored Nov 14, 2024
2 parents 06267d2 + 8aad8b4 commit 2bf84a3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,15 @@ const Sidebar = ({
</Button>
{showEnvVars && (
<div className="space-y-2">
{Object.entries(env).map(([key, value]) => (
<div key={key} className="grid grid-cols-[1fr,auto] gap-2">
{Object.entries(env).map(([key, value], idx) => (
<div key={idx} className="grid grid-cols-[1fr,auto] gap-2">
<div className="space-y-1">
<Input
placeholder="Key"
value={key}
onChange={(e) => {
const newEnv = { ...env };
delete newEnv[key];
newEnv[e.target.value] = value;
setEnv(newEnv);
}}
Expand Down

0 comments on commit 2bf84a3

Please sign in to comment.