diff --git a/frontend/src/components/format/FormatConditionsTab.jsx b/frontend/src/components/format/FormatConditionsTab.jsx index a4f8b6f..1b8e147 100644 --- a/frontend/src/components/format/FormatConditionsTab.jsx +++ b/frontend/src/components/format/FormatConditionsTab.jsx @@ -9,7 +9,7 @@ const FormatConditionsTab = ({conditions, onConditionsChange}) => { const {patterns, isLoading, error} = usePatterns(); const handleAddCondition = () => { - onConditionsChange([...conditions, createCondition()]); + onConditionsChange([createCondition(), ...conditions]); }; const handleConditionChange = (index, updatedCondition) => { @@ -53,47 +53,45 @@ const FormatConditionsTab = ({conditions, onConditionsChange}) => { } return ( -
- {/* Info Box */} -
- -

- Conditions define how this format matches media releases. - Each condition can be marked as required or negated. - Required conditions must match for the format to apply, - while negated conditions must not match. Use patterns to - match against release titles and groups. -

+
+ {/* Header with Info and Add Button */} +
+
+ +

+ Conditions define how this format matches media + releases. Each condition can be marked as required or + negated. Required conditions must match for the format + to apply, while negated conditions must not match. Use + patterns to match against release titles and groups. +

+
+
- {/* Existing Conditions */} -
- {conditions.map((condition, index) => ( - - handleConditionChange(index, updatedCondition) - } - onDelete={() => handleConditionDelete(index)} - patterns={patterns} - onMoveUp={() => handleMoveUp(index)} - onMoveDown={() => handleMoveDown(index)} - isFirst={index === 0} - isLast={index === conditions.length - 1} - /> - ))} -
- - {/* Add New Condition Card */} -
-
- - - Add New Condition - + {/* Scrollable Conditions List */} +
+
+ {conditions.map((condition, index) => ( + + handleConditionChange(index, updatedCondition) + } + onDelete={() => handleConditionDelete(index)} + patterns={patterns} + onMoveUp={() => handleMoveUp(index)} + onMoveDown={() => handleMoveDown(index)} + isFirst={index === 0} + isLast={index === conditions.length - 1} + /> + ))}