diff --git a/app/pages/resource/ResourcePage.js b/app/pages/resource/ResourcePage.js
index de8ce0226..edf7cecb3 100644
--- a/app/pages/resource/ResourcePage.js
+++ b/app/pages/resource/ResourcePage.js
@@ -18,7 +18,7 @@ import { addNotification } from 'actions/notificationsActions';
import { fetchResource } from 'actions/resourceActions';
import { clearReservations, toggleResourceMap } from 'actions/uiActions';
import PageWrapper from 'pages/PageWrapper';
-import NotFoundPage from 'pages/not-found/NotFoundPage';
+import NotFoundPage from 'pages/not-found';
import ResourceCalendar from 'shared/resource-calendar';
import ResourceMap from 'shared/resource-map';
import { injectT } from 'i18n';
diff --git a/app/shared/footer/FooterContent.js b/app/shared/footer/FooterContent.js
index fbdc08c98..a2a191eb2 100644
--- a/app/shared/footer/FooterContent.js
+++ b/app/shared/footer/FooterContent.js
@@ -13,45 +13,42 @@ import logoSv from '@city-assets/images/logo_footer_sv.png';
import { injectT } from 'i18n';
import { getFeedbackLink } from 'utils/languageUtils';
-class FooterContent extends React.Component {
- static propTypes = {
- t: PropTypes.func,
- currentLang: PropTypes.string,
- };
-
- render() {
- const { t, currentLang } = this.props;
- const currentLogo = (currentLang !== 'sv') ? logoFi : logoSv;
- const currentLink = getFeedbackLink(currentLang);
- return (
-
-
-
-
-
-
-
-
- Varaamo
-
-
-
-
- {t('AccessibilityInfo.title')}
-
-
- {t('Footer.feedbackLink')}
-
-
-
-
-
- );
- }
+function FooterContent({ t, currentLang }) {
+ const currentLogo = (currentLang !== 'sv') ? logoFi : logoSv;
+ const currentLink = getFeedbackLink(currentLang);
+ return (
+
+
+
+
+
+
+
+
+ Varaamo
+
+
+
+
+ {t('AccessibilityInfo.title')}
+
+
+ {t('Footer.feedbackLink')}
+
+
+
+
+
+ );
}
+FooterContent.propTypes = {
+ t: PropTypes.func.isRequired,
+ currentLang: PropTypes.string.isRequired,
+};
+
export default injectT(FooterContent);
diff --git a/app/shared/notifications/NotificationsContainer.js b/app/shared/notifications/NotificationsContainer.js
index a26c80a7a..76706588f 100644
--- a/app/shared/notifications/NotificationsContainer.js
+++ b/app/shared/notifications/NotificationsContainer.js
@@ -1,5 +1,5 @@
import PropTypes from 'prop-types';
-import React, { Component } from 'react';
+import React from 'react';
import ReactNotifications from 'react-notifications';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
@@ -8,20 +8,18 @@ import { hideNotification } from 'actions/notificationsActions';
import { injectT } from 'i18n';
import notificationsSelector from './notificationsSelector';
-class UnconnectedNotificationsContainer extends Component {
- render() {
- const { actions, notifications, t } = this.props;
- const translatedNotifications = notifications.map(notification => ({
- ...notification,
- message: notification.message || t(notification.messageId),
- }));
- return (
-
- );
- }
+function UnconnectedNotificationsContainer(props) {
+ const { actions, notifications, t } = props;
+ const translatedNotifications = notifications.map(notification => ({
+ ...notification,
+ message: notification.message || t(notification.messageId),
+ }));
+ return (
+
+ );
}
UnconnectedNotificationsContainer.propTypes = {
diff --git a/app/shared/time-range/TimeRange.js b/app/shared/time-range/TimeRange.js
index 85110e305..e33952cbb 100644
--- a/app/shared/time-range/TimeRange.js
+++ b/app/shared/time-range/TimeRange.js
@@ -1,28 +1,26 @@
import upperFirst from 'lodash/upperFirst';
import moment from 'moment';
import PropTypes from 'prop-types';
-import React, { Component } from 'react';
+import React from 'react';
-class TimeRange extends Component {
- render() {
- const {
- begin,
- className,
- beginFormat,
- end,
- endFormat,
- } = this.props;
- const beginMoment = moment(begin);
- const endMoment = moment(end);
- const rangeString = `${beginMoment.format(beginFormat)} \u2013 ${endMoment.format(endFormat)}`;
- const ISORangeString = `${begin}/${end}`;
+function TimeRange(props) {
+ const {
+ begin,
+ className,
+ beginFormat,
+ end,
+ endFormat,
+ } = props;
+ const beginMoment = moment(begin);
+ const endMoment = moment(end);
+ const rangeString = `${beginMoment.format(beginFormat)} \u2013 ${endMoment.format(endFormat)}`;
+ const ISORangeString = `${begin}/${end}`;
- return (
-
- );
- }
+ return (
+
+ );
}
TimeRange.propTypes = {
diff --git a/app/shared/top-navbar/mobile/MobileNavbar.js b/app/shared/top-navbar/mobile/MobileNavbar.js
index 084121bce..639ca16d9 100644
--- a/app/shared/top-navbar/mobile/MobileNavbar.js
+++ b/app/shared/top-navbar/mobile/MobileNavbar.js
@@ -7,33 +7,28 @@ import Row from 'react-bootstrap/lib/Row';
import FontChanger from 'shared/top-navbar/accessibility/TopNavbarFontContainer';
import ContrastChanger from 'shared/top-navbar/accessibility/TopNavbarContrastContainer';
-class MobileNavbar extends React.Component {
- static propTypes = {
- toggle: PropTypes.bool,
- contrast: PropTypes.string
- };
-
-
- getCollapseStatus = () => (this.props.toggle ? '' : 'is-collapsed')
-
- render() {
- const element = this.getCollapseStatus();
- return (
-
-
+function MobileNavbar({ toggle, contrast }) {
+ const getCollapseStatus = () => (toggle ? '' : 'is-collapsed');
+ const element = getCollapseStatus();
+ return (
+
+ );
}
+MobileNavbar.propTypes = {
+ toggle: PropTypes.bool,
+ contrast: PropTypes.string
+};
export default MobileNavbar;