mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-09 03:32:54 -05:00
Coderabbit feedback
This commit is contained in:
@@ -112,7 +112,7 @@ export function MobileRulesPage() {
|
||||
const { mutate: deleteRule } = useDeleteRuleMutation();
|
||||
|
||||
const handleRuleDelete = useCallback(
|
||||
async (rule: RuleEntity) => {
|
||||
(rule: RuleEntity) => {
|
||||
deleteRule(
|
||||
{ id: rule.id },
|
||||
{
|
||||
|
||||
@@ -1016,9 +1016,7 @@ export function RuleEditor({
|
||||
return parsedActions.reduce(
|
||||
(acc, action) => {
|
||||
const splitIndex =
|
||||
'options' in action && 'splitIndex' in action.options
|
||||
? (action.options.splitIndex ?? 0)
|
||||
: 0;
|
||||
'options' in action ? (action.options?.splitIndex ?? 0) : 0;
|
||||
acc[splitIndex] = acc[splitIndex] ?? { id: uuid(), actions: [] };
|
||||
acc[splitIndex].actions.push({ ...action, inputKey: uuid() });
|
||||
return acc;
|
||||
|
||||
Reference in New Issue
Block a user