Update environment variable entity schema to update them individually (#53)

* Change environment field to enum instead of array

* Update gql client for get environment variables query

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
This commit is contained in:
2024-02-01 11:37:57 +05:30
committed by Ashwin Phatak
co-authored by neeraj
parent 8ead083ab3
commit 2f8d21baf5
11 changed files with 69 additions and 56 deletions
@@ -11,7 +11,7 @@ interface OverviewProps {
project: Project;
}
// TODO: Check any live domain is set for production branch
// TODO: Check if any live domain is set for production branch
const IS_DOMAIN_SETUP = true;
const OverviewTabPanel = ({ project }: OverviewProps) => {
@@ -72,8 +72,8 @@ export const EnvironmentVariablesTabPanel = () => {
const getEnvironmentVariable = useCallback(
(environment: Environment) => {
return environmentVariables.filter((item) =>
item.environments.includes(environment),
return environmentVariables.filter(
(item) => item.environment === environment,
);
},
[environmentVariables, id],
@@ -43,7 +43,7 @@ const MembersTabPanel = ({ project }: { project: Project }) => {
useEffect(() => {
fetchProjectMembers();
}, [project.id]);
}, [project.id, fetchProjectMembers]);
return (
<div className="p-2 mb-20">