Skip to content

Commit

Permalink
Pass children directly into the React components instead of using an …
Browse files Browse the repository at this point in the history
…Array, which results in a "key missing" warning
  • Loading branch information
scott113341 committed May 28, 2017
1 parent ab7f83f commit 67812c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/history-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ function render (alert) {
const maxTime = Math.max(...times);
const maxPrice = Math.ceil(Math.max(...data.map(d => d.price)) / 50) * 50;

const Graph = e('div', null, [
const Graph = e('div', null,
e(V.VictoryChart, {
domainPadding: 20,
padding: { top: 10, right: 50, bottom: 50, left: 50 },
theme: Theme
}, [
},
e(V.VictoryAxis, {
domainPadding: 0,
tickFormat: date => dateFormat(new Date(date), 'm/d', true)
Expand Down Expand Up @@ -65,8 +65,8 @@ function render (alert) {
x: 0,
y: 1
})
])
]);
)
);

return ReactDOMServer.renderToStaticMarkup(Graph);
}
Expand Down

0 comments on commit 67812c2

Please sign in to comment.