From ff55d315f16b7c7f8e4d5dd9941190e45f197af6 Mon Sep 17 00:00:00 2001 From: ashleydb Date: Sun, 5 Feb 2017 16:17:40 -0800 Subject: [PATCH] Fixing minor date bug --- app/components/Todo.jsx | 2 +- public/bundle.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/Todo.jsx b/app/components/Todo.jsx index 8e974c1..429ce5a 100644 --- a/app/components/Todo.jsx +++ b/app/components/Todo.jsx @@ -16,7 +16,7 @@ export var Todo = React.createClass({ message = 'Completed: ' timestamp = completedAt; } - return message + moment.unix(timestamp).format('d-MMM-YYYY @ HH:mm'); + return message + moment.unix(timestamp).format('D-MMM-YYYY @ HH:mm'); } return ( diff --git a/public/bundle.js b/public/bundle.js index 3efe509..9a1e153 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -2795,7 +2795,7 @@ /* 458 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = __webpack_require__(8);\n\nvar _require = __webpack_require__(185),\n connect = _require.connect;\n\nvar moment = __webpack_require__(347);\nvar actions = __webpack_require__(459);\n\n// Only exporting this component for use in automated tests\nvar Todo = exports.Todo = React.createClass({\n displayName: 'Todo',\n\n render: function render() {\n var _props = this.props,\n id = _props.id,\n text = _props.text,\n createdAt = _props.createdAt,\n completedAt = _props.completedAt,\n complete = _props.complete,\n dispatch = _props.dispatch;\n\n var todoClassName = complete ? 'todo todo-complete' : 'todo';\n\n var renderDate = function renderDate() {\n var message = 'Created: ';\n var timestamp = createdAt;\n if (complete) {\n message = 'Completed: ';\n timestamp = completedAt;\n }\n return message + moment.unix(timestamp).format('d-MMM-YYYY @ HH:mm');\n };\n\n return React.createElement(\n 'div',\n { className: todoClassName, onClick: function onClick() {\n dispatch(actions.toggleTodo(id));\n } },\n React.createElement(\n 'div',\n null,\n React.createElement('input', { type: 'checkbox', ref: 'markCompleted', checked: complete })\n ),\n React.createElement(\n 'div',\n null,\n React.createElement(\n 'p',\n null,\n text\n ),\n React.createElement(\n 'p',\n { className: 'todo__subtext' },\n renderDate()\n )\n )\n );\n }\n});\n\n// export default means that this is the version of the component that require() will return.\n// This is the redux version of the component. Note that connect() provides access to dispatch() as a prop.\nexports.default = connect()(Todo);//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDU4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL2FwcC9jb21wb25lbnRzL1RvZG8uanN4P2I3MzQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIFJlYWN0ID0gcmVxdWlyZSgncmVhY3QnKTtcbnZhciB7Y29ubmVjdH0gPSByZXF1aXJlKCdyZWFjdC1yZWR1eCcpO1xudmFyIG1vbWVudCA9IHJlcXVpcmUoJ21vbWVudCcpO1xudmFyIGFjdGlvbnMgPSByZXF1aXJlKCdhY3Rpb25zJyk7XG5cbi8vIE9ubHkgZXhwb3J0aW5nIHRoaXMgY29tcG9uZW50IGZvciB1c2UgaW4gYXV0b21hdGVkIHRlc3RzXG5leHBvcnQgdmFyIFRvZG8gPSBSZWFjdC5jcmVhdGVDbGFzcyh7XG4gIHJlbmRlcjogZnVuY3Rpb24oKSB7XG4gICAgdmFyIHtpZCwgdGV4dCwgY3JlYXRlZEF0LCBjb21wbGV0ZWRBdCwgY29tcGxldGUsIGRpc3BhdGNofSA9IHRoaXMucHJvcHM7XG4gICAgdmFyIHRvZG9DbGFzc05hbWUgPSAoY29tcGxldGUpID8gJ3RvZG8gdG9kby1jb21wbGV0ZScgOiAndG9kbyc7XG4gICAgICBcbiAgICAgIHZhciByZW5kZXJEYXRlID0gKCkgPT4ge1xuICAgICAgICAgIHZhciBtZXNzYWdlID0gJ0NyZWF0ZWQ6ICc7XG4gICAgICAgICAgdmFyIHRpbWVzdGFtcCA9IGNyZWF0ZWRBdDtcbiAgICAgICAgICBpZiAoY29tcGxldGUpIHtcbiAgICAgICAgICAgICAgbWVzc2F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UEFDSyBGT09URVIgLy9cbi8vIGFwcC9jb21wb25lbnRzL1RvZG8uanN4Il0sIm1hcHBpbmdzIjoiOzs7OztBQUFBO0FBQ0E7QUFBQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQUE7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQUE7QUFDQTtBQURBO0FBR0E7QUFBQTtBQUFBO0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFGQTtBQU5BO0FBWUE7QUE1QkE7QUFDQTtBQThCQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ=="); + eval("'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = __webpack_require__(8);\n\nvar _require = __webpack_require__(185),\n connect = _require.connect;\n\nvar moment = __webpack_require__(347);\nvar actions = __webpack_require__(459);\n\n// Only exporting this component for use in automated tests\nvar Todo = exports.Todo = React.createClass({\n displayName: 'Todo',\n\n render: function render() {\n var _props = this.props,\n id = _props.id,\n text = _props.text,\n createdAt = _props.createdAt,\n completedAt = _props.completedAt,\n complete = _props.complete,\n dispatch = _props.dispatch;\n\n var todoClassName = complete ? 'todo todo-complete' : 'todo';\n\n var renderDate = function renderDate() {\n var message = 'Created: ';\n var timestamp = createdAt;\n if (complete) {\n message = 'Completed: ';\n timestamp = completedAt;\n }\n return message + moment.unix(timestamp).format('D-MMM-YYYY @ HH:mm');\n };\n\n return React.createElement(\n 'div',\n { className: todoClassName, onClick: function onClick() {\n dispatch(actions.toggleTodo(id));\n } },\n React.createElement(\n 'div',\n null,\n React.createElement('input', { type: 'checkbox', ref: 'markCompleted', checked: complete })\n ),\n React.createElement(\n 'div',\n null,\n React.createElement(\n 'p',\n null,\n text\n ),\n React.createElement(\n 'p',\n { className: 'todo__subtext' },\n renderDate()\n )\n )\n );\n }\n});\n\n// export default means that this is the version of the component that require() will return.\n// This is the redux version of the component. Note that connect() provides access to dispatch() as a prop.\nexports.default = connect()(Todo);//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDU4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL2FwcC9jb21wb25lbnRzL1RvZG8uanN4P2I3MzQiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIFJlYWN0ID0gcmVxdWlyZSgncmVhY3QnKTtcbnZhciB7Y29ubmVjdH0gPSByZXF1aXJlKCdyZWFjdC1yZWR1eCcpO1xudmFyIG1vbWVudCA9IHJlcXVpcmUoJ21vbWVudCcpO1xudmFyIGFjdGlvbnMgPSByZXF1aXJlKCdhY3Rpb25zJyk7XG5cbi8vIE9ubHkgZXhwb3J0aW5nIHRoaXMgY29tcG9uZW50IGZvciB1c2UgaW4gYXV0b21hdGVkIHRlc3RzXG5leHBvcnQgdmFyIFRvZG8gPSBSZWFjdC5jcmVhdGVDbGFzcyh7XG4gIHJlbmRlcjogZnVuY3Rpb24oKSB7XG4gICAgdmFyIHtpZCwgdGV4dCwgY3JlYXRlZEF0LCBjb21wbGV0ZWRBdCwgY29tcGxldGUsIGRpc3BhdGNofSA9IHRoaXMucHJvcHM7XG4gICAgdmFyIHRvZG9DbGFzc05hbWUgPSAoY29tcGxldGUpID8gJ3RvZG8gdG9kby1jb21wbGV0ZScgOiAndG9kbyc7XG4gICAgICBcbiAgICAgIHZhciByZW5kZXJEYXRlID0gKCkgPT4ge1xuICAgICAgICAgIHZhciBtZXNzYWdlID0gJ0NyZWF0ZWQ6ICc7XG4gICAgICAgICAgdmFyIHRpbWVzdGFtcCA9IGNyZ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