From e4b40080f4f2f680c6c6985a401ce820f8885a1c Mon Sep 17 00:00:00 2001 From: MananTank Date: Mon, 11 Nov 2024 16:13:04 +0000 Subject: [PATCH] Remove invalid modules loading spinner in contract deploy page (#5379) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem solved Short description of the bug fixed or feature added --- ## PR-Codex overview This PR focuses on simplifying the conditional rendering of the `ModularContractDefaultModulesFieldset` component by removing unnecessary nested ternary operators and improving code readability. ### Detailed summary - Removed nested ternary operator for rendering `ModularContractDefaultModulesFieldset`. - Simplified the condition to check if `modules` exists and has length greater than 0. - Streamlined the rendering logic for better readability. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../contract-deploy-form/custom-contract.tsx | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx b/apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx index 599000768b7..2b3683b8389 100644 --- a/apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx +++ b/apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx @@ -1,6 +1,4 @@ "use client"; - -import { Spinner } from "@/components/ui/Spinner/Spinner"; import { Alert, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { Checkbox, CheckboxWithLabel } from "@/components/ui/checkbox"; @@ -765,18 +763,13 @@ export const CustomContractForm: React.FC = ({ ); })} - {isModular && - (modules?.length ? ( - - ) : ( -
- -
- ))} + {isModular && modules && modules.length > 0 && ( + + )} {advancedParams.length > 0 && (