Skip to content

Commit cdde80a

Browse files
authored
Implemented a landing page for production (#1443)
1 parent 991ab85 commit cdde80a

File tree

5 files changed

+404
-323
lines changed

5 files changed

+404
-323
lines changed

client/App.jsx

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import React, { useEffect } from 'react';
22
import PropTypes from 'proptypes';
33
import { connect } from 'react-redux';
4-
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
4+
import {
5+
BrowserRouter as Router, Switch, Route, Redirect,
6+
} from 'react-router-dom';
57
import 'focus-visible';
68
import { getMetadataRequest } from '@reducers/metadata';
79

@@ -12,8 +14,11 @@ import Header from '@components/main/header/Header';
1214
import Footer from '@components/main/footer/Footer';
1315
import StaticFooter from '@components/main/footer/StaticFooter';
1416
import { SnapshotRenderer } from '@components/export/SnapshotService';
17+
import MaintenanceMode from '@components/MaintenanceMode';
1518
import Routes from './Routes';
1619

20+
const maintenanceMode = true;
21+
1722
const App = ({
1823
getMetadata,
1924
}) => {
@@ -22,17 +27,28 @@ const App = ({
2227
});
2328

2429
return (
25-
<Router>
26-
<RouteChange actions={actions} />
27-
<Header />
28-
<Routes />
29-
<Switch>
30-
<Route path="/(about|contact|privacy|faq)" component={StaticFooter} />
31-
<Route path="/" component={Footer} />
32-
</Switch>
33-
<SnapshotRenderer />
34-
<CookieNotice />
35-
</Router>
30+
maintenanceMode === true
31+
? (
32+
<Router>
33+
<Switch>
34+
<Route path="/" component={MaintenanceMode} />
35+
<Redirect to="/" />
36+
</Switch>
37+
</Router>
38+
)
39+
: (
40+
<Router>
41+
<RouteChange actions={actions} />
42+
<Header />
43+
<Routes />
44+
<Switch>
45+
<Route path="/(about|contact|privacy|faq)" component={StaticFooter} />
46+
<Route path="/" component={Footer} />
47+
</Switch>
48+
<SnapshotRenderer />
49+
<CookieNotice />
50+
</Router>
51+
)
3652
);
3753
};
3854

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React from 'react';
2+
3+
const MaintenanceMode = () => (
4+
<div className="maintenance" role="banner">
5+
<div className="maintenance-overlay-text">
6+
<span className="text-311">311</span>
7+
<span className="text-data">DATA</span>
8+
<div className="maintenance-text">
9+
<div>
10+
<span>
11+
311-Data.com is temporarily unavailable while we prepare for our new version.
12+
Please check back again for our improved analytics tools. Thank you!
13+
</span>
14+
</div>
15+
</div>
16+
</div>
17+
</div>
18+
);
19+
20+
export default MaintenanceMode;

0 commit comments

Comments
 (0)