Skip to content

Commit 80e605b

Browse files
committed
front: fix pathfinding error message bubble
setFailure() doesn't accept a "message" property. Additionally, the "pathfindingError" translation needs an "errorMessage" property. To reproduce: - Select a train in small_infra - Switch to another infra (e.g. France) - Open the "Create new train" modal Signed-off-by: Simon Ser <contact@emersion.fr>
1 parent 5d127e0 commit 80e605b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

front/src/modules/pathfinding/hooks/usePathfinding.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ const usePathfinding = (
9090
launchPathfinding(updatedPathSteps);
9191
} else {
9292
setError(t('missingPathSteps'));
93-
dispatch(setFailure({ name: t('pathfindingError'), message: t('missingPathSteps') }));
93+
dispatch(
94+
setFailure({ name: t('pathfindingError', { errorMessage: t('missingPathSteps') }) })
95+
);
9496
}
9597
};
9698

0 commit comments

Comments
 (0)