From ce8742f2c6604f6d2222363359a220fd1984b4e1 Mon Sep 17 00:00:00 2001 From: Eduard <2969639+elataret@users.noreply.github.com> Date: Fri, 21 Jun 2024 13:44:17 +0300 Subject: [PATCH] Remove extra compiled projects for deployment (#109) Signed-off-by: Eduard Lataretu <2969639+elataret@users.noreply.github.com> --- plugin/src/features/Compilation/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/src/features/Compilation/index.tsx b/plugin/src/features/Compilation/index.tsx index ce932650..9fdb2948 100644 --- a/plugin/src/features/Compilation/index.tsx +++ b/plugin/src/features/Compilation/index.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { useAtom, useAtomValue, useSetAtom } from 'jotai' +import { useAtomValue, useSetAtom } from 'jotai' import { artifactFolder } from '@/utils/utils' import Container from '../../ui_components/Container' import { type AccordianTabs } from '../Plugin' @@ -30,7 +30,7 @@ export const Compilation: React.FC = ({ setAccordian }) => { const activeTomlPath = useAtomValue(activeTomlPathAtom) const currentWorkspacePath = useAtomValue(currentWorkspacePathAtom) - const [contracts, setContracts] = useAtom(contractsAtom) + const setContracts = useSetAtom(contractsAtom) const setSelectedContract = useSetAtom(selectedContractAtom) const { status, isCompiling } = useAtomValue(compilationAtom) @@ -165,7 +165,7 @@ export const Compilation: React.FC = ({ setAccordian }) => { contractsToAdd.push(contract) } - setContracts([...contractsToAdd, ...contracts]) + setContracts(contractsToAdd) setSelectedContract(contractsToAdd[0]) for (const file of compileResult.file_content) {