Skip to content

Commit ef665d7

Browse files
committed
Merge branch 'v3' into AB#509
2 parents c3b2473 + 2d63427 commit ef665d7

28 files changed

Lines changed: 59 additions & 101 deletions

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
LICENSE*
88
Changelog.md
9-
win-launch-scripts/
109
docs/
1110
/test
1211

app/action/realTimeClientAction.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { startMqttClient, changeTopics } from '../util/mqttClient';
22

33
export function startRealTimeClient(actionContext, settings, done) {
44
/* settings may have changed, so reset old store content */
5-
if (actionContext.config.NODE_ENV === 'test') {
5+
if (process.env.NODE_ENV === 'test') {
66
return;
77
}
88
actionContext.dispatch('RealTimeClientReset');

app/component/AppBar.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ export default function AppBar(
4343
return (
4444
<>
4545
{disruptionInfoOpen && <DisruptionInfo setOpen={toggleDisruptionInfo} />}
46-
{config.NODE_ENV !== 'test' && <MessageBar breakpoint={breakpoint} />}
46+
{process.env.NODE_ENV !== 'test' && (
47+
<MessageBar breakpoint={breakpoint} />
48+
)}
4749
<nav className={`top-bar ${breakpoint !== 'large' ? 'mobile' : ''}`}>
4850
<section className="title">
4951
<button

app/component/AppBarHsl.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ const AppBarHsl = ({ lang, user, favourites }, context) => {
2929
const [banners, setBanners] = useState([]);
3030

3131
useEffect(() => {
32-
if (config.URL.BANNERS && config.NODE_ENV !== 'test') {
32+
if (config.URL.BANNERS && process.env.NODE_ENV !== 'test') {
3333
getJson(`${config.URL.BANNERS}&language=${lang}`)
3434
.then(data => setBanners(data))
3535
.catch(() => setBanners([]));
3636
}
3737
}, [lang]);
3838

3939
useEffect(() => {
40-
if (config.URL.FONTCOUNTER && config.NODE_ENV === 'production') {
40+
if (config.URL.FONTCOUNTER && process.env.NODE_ENV === 'production') {
4141
fetch(config.URL.FONTCOUNTER, {
4242
mode: 'no-cors',
4343
});

app/component/BackButton.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default function BackButton(props, context) {
3939

4040
let url;
4141
// apply rootlink only in production, it is annoying locally
42-
if (config.NODE_ENV !== 'development') {
42+
if (process.env.NODE_ENV !== 'development') {
4343
if (config.passLanguageToRootLink && intl.locale !== 'fi') {
4444
url = `${config.URL.ROOTLINK}/${intl.locale}`;
4545
} else {

app/component/MapLayersDialogContent.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ class MapLayersDialogContent extends React.Component {
220220
)}
221221
{showRentalVehiclesOfType(
222222
config.vehicleRental?.networks,
223-
config,
224223
TransportMode.Citybike,
225224
) && (
226225
<Checkbox
@@ -237,7 +236,6 @@ class MapLayersDialogContent extends React.Component {
237236
)}
238237
{showRentalVehiclesOfType(
239238
config.vehicleRental?.networks,
240-
config,
241239
TransportMode.Scooter,
242240
) && (
243241
<Checkbox

app/component/itinerary/ItineraryPageUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export function settingsLimitRouting(config) {
205205
}
206206

207207
export function setCurrentTimeToURL(config, match) {
208-
if (config.NODE_ENV !== 'test' && !match.location?.query?.time) {
208+
if (process.env.NODE_ENV !== 'test' && !match.location?.query?.time) {
209209
const newLocation = {
210210
...match.location,
211211
query: {

app/component/itinerary/TransitLeg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ class TransitLeg extends React.Component {
376376
};
377377
const routeNotifications = [];
378378
if (
379-
config.NODE_ENV !== 'test' &&
379+
process.env.NODE_ENV !== 'test' &&
380380
config.routeNotifications &&
381381
config.routeNotifications.length > 0
382382
) {

app/component/routepage/RouteControlPanel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ class RouteControlPanel extends React.Component {
291291
const { config, executeAction } = this.context;
292292
const { match, route, tripStartTime } = this.props;
293293
const { realTime } = config;
294-
if (config.NODE_ENV === 'test' || !realTime) {
294+
if (process.env.NODE_ENV === 'test' || !realTime) {
295295
return;
296296
}
297297

@@ -365,7 +365,7 @@ class RouteControlPanel extends React.Component {
365365

366366
const routeNotifications = [];
367367
if (
368-
config.NODE_ENV !== 'test' &&
368+
process.env.NODE_ENV !== 'test' &&
369369
config.routeNotifications &&
370370
config.routeNotifications.length > 0
371371
) {

app/configurations/config.default.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ const API_SUBSCRIPTION_HEADER_NAME =
2121
const API_SUBSCRIPTION_TOKEN =
2222
process.env.API_SUBSCRIPTION_TOKEN || 'c65af0cd2d0a401a9599894970a2b29c';
2323

24-
const {
25-
// AXE,
26-
NODE_ENV,
27-
RUN_ENV,
28-
} = process.env;
2924
const hasAPISubscriptionQueryParameter = true;
3025
const PORT = process.env.PORT || 8080;
3126
const APP_DESCRIPTION = 'Digitransit journey planning UI';
@@ -38,7 +33,6 @@ export default {
3833
PORT,
3934
// AXE,
4035
CONFIG,
41-
NODE_ENV,
4236
OTPTimeout: OTP_TIMEOUT,
4337
URL: {
4438
API_URL,
@@ -113,7 +107,6 @@ export default {
113107
API_SUBSCRIPTION_QUERY_PARAMETER_NAME,
114108
API_SUBSCRIPTION_HEADER_NAME,
115109
API_SUBSCRIPTION_TOKEN,
116-
RUN_ENV,
117110

118111
hasAPISubscriptionQueryParameter,
119112

0 commit comments

Comments
 (0)