Skip to content

Commit 98176e3

Browse files
committed
some cleanup
1 parent e5d9d00 commit 98176e3

File tree

1 file changed

+1
-49
lines changed

1 file changed

+1
-49
lines changed

app/component/itinerary/navigator/NaviCardExtension.js

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import ZoneIcon from '../../ZoneIcon';
1515
import { legShape, configShape } from '../../../util/shapes';
1616
import { getDestinationProperties, LEGTYPE, withRealTime } from './NaviUtils';
1717
import { getRouteMode } from '../../../util/modeUtils';
18-
import RouteNumber from '../../RouteNumber';
1918
import RouteNumberContainer from '../../RouteNumberContainer';
2019
import NaviBoardingInfo from './NaviBoardingInfo';
2120

@@ -159,54 +158,7 @@ const NaviCardExtension = ({ legType, leg, nextLeg, time }, { config }) => {
159158
</div>
160159
);
161160
}
162-
if (legType === LEGTYPE.MOVE && nextLeg) {
163-
const { headsign, route, start } = nextLeg;
164-
const hs = headsign || nextLeg.trip?.tripHeadsign;
165-
const remainingDuration = Math.max(
166-
Math.ceil((legTime(start) - time) / 60000),
167-
0,
168-
); // ms to minutes, >= 0
169-
const rt = nextLeg.realtimeState === 'UPDATED';
170-
const values = {
171-
duration: withRealTime(rt, remainingDuration),
172-
legTime: withRealTime(rt, legTimeStr(start)),
173-
};
174-
const routeMode = getRouteMode(route, config);
175-
const iconColor =
176-
config.colors.iconColors[`mode-${routeMode}`] ||
177-
route.color ||
178-
'currentColor';
179-
return (
180-
<div className="extension">
181-
{stopInformation()}
182-
<div className="extension-divider" />
183-
<div className="wait-leg">
184-
<div className="route-info">
185-
<div className="expand">
186-
<Icon img="navi-expand" className="icon-expand-small" />
187-
<div className="wait-duration">
188-
<FormattedMessage
189-
id="navileg-arrive-at"
190-
defaultMessage="{duration} min päästä klo {legTime}"
191-
values={values}
192-
/>
193-
</div>
194-
</div>
195-
<div className="routenumber">
196-
<RouteNumber
197-
mode={routeMode}
198-
text={route?.shortName}
199-
withBar
200-
isTransitLeg
201-
color={iconColor}
202-
/>
203-
<div className="headsign">{hs}</div>
204-
</div>
205-
</div>
206-
</div>
207-
</div>
208-
);
209-
}
161+
210162
return (
211163
<div className="extension">
212164
<div className="extension-divider" />

0 commit comments

Comments
 (0)