Skip to content

Commit

Permalink
fix(dashboard): environment variables deletion (#877)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuiiBz authored May 16, 2023
1 parent a3d5ce8 commit 79fd8f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/seven-doors-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lagon/dashboard': patch
---

Fix environment variables deletion
12 changes: 3 additions & 9 deletions packages/dashboard/lib/pages/function/FunctionSettings.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useRouter } from 'next/router';
import toast from 'react-hot-toast';
import { Button, Card, Form, Input, Text, TagsInput, Dialog, Menu, Divider } from '@lagon/ui';
import { Button, Card, Form, Input, Text, TagsInput, Dialog, Menu } from '@lagon/ui';
import { getCurrentDomain } from 'lib/utils';
import {
composeValidators,
Expand Down Expand Up @@ -229,20 +229,14 @@ const FunctionSettings = ({ func, refetch }: FunctionSettingsProps) => {
event.preventDefault();
}
}}
validator={composeValidators(
requiredValidator,
maxLengthValidator(ENVIRONMENT_VARIABLE_KEY_MAX_LENGTH),
)}
validator={maxLengthValidator(ENVIRONMENT_VARIABLE_KEY_MAX_LENGTH)}
/>
<Input
name="envValue"
placeholder={t('env.placeholder.value')}
type="password"
disabled={updateFunction.isLoading}
validator={composeValidators(
requiredValidator,
maxLengthValidator(ENVIRONMENT_VARIABLE_VALUE_MAX_SIZE),
)}
validator={maxLengthValidator(ENVIRONMENT_VARIABLE_VALUE_MAX_SIZE)}
/>
<Button
disabled={updateFunction.isLoading}
Expand Down

1 comment on commit 79fd8f6

@vercel
Copy link

@vercel vercel bot commented on 79fd8f6 May 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

dashboard – ./packages/dashboard

dashboard-lagon.vercel.app
dash.lagon.app
dashboard-git-main-lagon.vercel.app

Please sign in to comment.