Lint & small changes
This commit is contained in:
parent
0c6d207967
commit
55238f59aa
21 changed files with 2522 additions and 423 deletions
|
|
@ -35,12 +35,22 @@ export function useTranslatedModes() {
|
|||
const { t } = useTranslation();
|
||||
const label = useCallback(
|
||||
(mode: TransportMode): string =>
|
||||
({ car: t('travel.modeCar'), bicycle: t('travel.modeBicycle'), walking: t('travel.modeWalking'), transit: t('travel.modeTransit') })[mode],
|
||||
({
|
||||
car: t('travel.modeCar'),
|
||||
bicycle: t('travel.modeBicycle'),
|
||||
walking: t('travel.modeWalking'),
|
||||
transit: t('travel.modeTransit'),
|
||||
})[mode],
|
||||
[t]
|
||||
);
|
||||
const desc = useCallback(
|
||||
(mode: TransportMode): string =>
|
||||
({ car: t('travel.modeCarDesc'), bicycle: t('travel.modeBicycleDesc'), walking: t('travel.modeWalkingDesc'), transit: t('travel.modeTransitDesc') })[mode],
|
||||
({
|
||||
car: t('travel.modeCarDesc'),
|
||||
bicycle: t('travel.modeBicycleDesc'),
|
||||
walking: t('travel.modeWalkingDesc'),
|
||||
transit: t('travel.modeTransitDesc'),
|
||||
})[mode],
|
||||
[t]
|
||||
);
|
||||
return { label, desc };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue