Add shelters

This commit is contained in:
Dana Woodman 2017-10-10 13:43:21 -07:00
parent 491db22b44
commit bfc7ae29eb
4 changed files with 20 additions and 6 deletions

8
app.js
View File

@ -88,7 +88,7 @@ function Table({ error, loading, items }) {
function formatCell(col, value) { function formatCell(col, value) {
// Date // Date
if (col.toLowerCase() === 'last updated') { if (col.toLowerCase() === 'last updated' && value) {
const date = new Date(value) const date = new Date(value)
return `${date.getMonth() + return `${date.getMonth() +
1}/${date.getDate()} at ${date.getHours()}:${date.getMinutes()}` 1}/${date.getDate()} at ${date.getHours()}:${date.getMinutes()}`
@ -112,7 +112,6 @@ ReactDOM.render(
<SmartTable url="http://app.tubbsfireinfo.com/recent_news.json" />, <SmartTable url="http://app.tubbsfireinfo.com/recent_news.json" />,
document.getElementById('resource-list') document.getElementById('resource-list')
) )
ReactDOM.render( ReactDOM.render(
<SmartTable url="http://app.tubbsfireinfo.com/gas_stations.json" />, <SmartTable url="http://app.tubbsfireinfo.com/gas_stations.json" />,
document.getElementById('gas-stations') document.getElementById('gas-stations')
@ -122,3 +121,8 @@ ReactDOM.render(
<SmartTable url="http://app.tubbsfireinfo.com/markets.json" />, <SmartTable url="http://app.tubbsfireinfo.com/markets.json" />,
document.getElementById('markets') document.getElementById('markets')
) )
ReactDOM.render(
<SmartTable url="http://app.tubbsfireinfo.com/shelters.json" />,
document.getElementById('shelters')
)

View File

@ -10013,7 +10013,7 @@ function Table({ error, loading, items }) {
function formatCell(col, value) { function formatCell(col, value) {
// Date // Date
if (col.toLowerCase() === 'last updated') { if (col.toLowerCase() === 'last updated' && value) {
const date = new Date(value); const date = new Date(value);
return `${date.getMonth() + 1}/${date.getDate()} at ${date.getHours()}:${date.getMinutes()}`; return `${date.getMonth() + 1}/${date.getDate()} at ${date.getHours()}:${date.getMinutes()}`;
} }
@ -10037,11 +10037,12 @@ function Row({ columns, item }) {
} }
ReactDOM.render(React.createElement(SmartTable, { url: 'http://app.tubbsfireinfo.com/recent_news.json' }), document.getElementById('resource-list')); ReactDOM.render(React.createElement(SmartTable, { url: 'http://app.tubbsfireinfo.com/recent_news.json' }), document.getElementById('resource-list'));
ReactDOM.render(React.createElement(SmartTable, { url: 'http://app.tubbsfireinfo.com/gas_stations.json' }), document.getElementById('gas-stations')); ReactDOM.render(React.createElement(SmartTable, { url: 'http://app.tubbsfireinfo.com/gas_stations.json' }), document.getElementById('gas-stations'));
ReactDOM.render(React.createElement(SmartTable, { url: 'http://app.tubbsfireinfo.com/markets.json' }), document.getElementById('markets')); ReactDOM.render(React.createElement(SmartTable, { url: 'http://app.tubbsfireinfo.com/markets.json' }), document.getElementById('markets'));
ReactDOM.render(React.createElement(SmartTable, { url: 'http://app.tubbsfireinfo.com/shelters.json' }), document.getElementById('shelters'));
/***/ }), /***/ }),
/* 343 */ /* 343 */
/***/ (function(module, exports) { /***/ (function(module, exports) {

View File

@ -71,7 +71,7 @@
</div> </div>
<div id="" class="bg-light section"> <div id="" class="bg-light section">
<div class="container"> <div class="container-fluid">
<h2 class="mb-3 text-center"> <h2 class="mb-3 text-center">
<i class="fa fa-car mr-3"></i> <i class="fa fa-car mr-3"></i>
@ -89,6 +89,15 @@
<p class="lead mb-5 text-center">A list of markets known to be open.</p> <p class="lead mb-5 text-center">A list of markets known to be open.</p>
<div id="markets"></div> <div id="markets"></div>
<hr class="my-5">
<h2 class="mb-3 text-center">
<i class="fa fa-home mr-3"></i>
Shelters
</h2>
<p class="lead mb-5 text-center">A list of shelters known to be open.</p>
<div id="shelters"></div>
</div> </div>
</div> </div>

View File

@ -27,7 +27,7 @@ const config = {
new ExtractTextPlugin('output.css'), new ExtractTextPlugin('output.css'),
new webpack.IgnorePlugin(/\.\/locale$/), new webpack.IgnorePlugin(/\.\/locale$/),
], ],
devtool: 'eval', // devtool: 'eval',
} }
module.exports = config module.exports = config