From 22616d322a67916df83a766421b028bc1b1ca5c9 Mon Sep 17 00:00:00 2001 From: Yang Zhao Date: Mon, 22 Apr 2024 21:25:27 -0700 Subject: [PATCH] more refactoring --- src/App.jsx | 66 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index f72466f..8a7eca5 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -3,9 +3,24 @@ import convertToFlagdFormat from "./convertToFlagdFormat" import "./App.css" const Rule = ({ index, variants, rule, handleRuleChange, removeRule }) => { + + const label = index === 0 ? "If" : "Else If" + + const semVerSubOperatorBlock = rule.condition.operator === "sem_ver" && ( + + ) + + const variantOptionsBlock = variants.filter(variant => variant.name).map((variant, index) => ( + + )) + return (
-