diff --git a/src/components/ConditionalRedirect.jsx b/src/components/ConditionalRedirect.jsx
index f71e6054a3..7a2112326e 100644
--- a/src/components/ConditionalRedirect.jsx
+++ b/src/components/ConditionalRedirect.jsx
@@ -4,19 +4,20 @@ import {
Redirect
} from 'react-router-dom';
-const ConditionalRedirect = ({ component: Component, shouldRedirect, redirectPath, ...props }) => {
- if (shouldRedirect()) {
- return (
-
- );
- } else {
- return (
- ()} />
- );
- }
-};
+const ConditionalRedirect = ({
+ component: Component,
+ shouldRedirect,
+ redirectPath,
+ location,
+ ...props
+}) => (shouldRedirect() ? (
+
+) : (
+ ()} />
+));
-export default ConditionalRedirect;
\ No newline at end of file
+export default ConditionalRedirect;
diff --git a/src/index.js b/src/index.jsx
similarity index 100%
rename from src/index.js
rename to src/index.jsx
diff --git a/src/pages/Login.jsx b/src/pages/Login.jsx
index bc8d6112cc..2a735dd70c 100644
--- a/src/pages/Login.jsx
+++ b/src/pages/Login.jsx
@@ -97,7 +97,7 @@ class LoginPage extends Component {
onChange={this.handleUsernameChange}
/>
-