From 34db8a79e45f7a310d3c0e7119ec0593276120ec Mon Sep 17 00:00:00 2001 From: Isaiah Odhner Date: Sun, 14 Oct 2018 01:19:00 -0400 Subject: [PATCH] Fix prop type warnings --- src/components/App.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/App.js b/src/components/App.js index 44d2c60..51b1d8a 100644 --- a/src/components/App.js +++ b/src/components/App.js @@ -16,8 +16,8 @@ class App extends Component { // TODO: move state outside of the component // also save data (in an at least *somewhat* future-proof way) this.state = { - palette: defaultPalette, // TODO: eventually remove the "palette" state as a concept; this data isn't special enough to warrant special handling - // it can be part of the document, and can be shared along with other things with other documents (like you can share tools in the same way as colors) + palette: defaultPalette, // TODO: eventually remove the "palette" state as a concept; I don't think this feature isn't special enough to warrant special handling (except for parsing palette files) + // it can be part of the document, and more dynamic, and could be shared with other documents the same way as tools selectedSwatch: defaultPalette[0], selectedTool: tools[0], undos: new List(), @@ -52,7 +52,9 @@ class App extends Component { // TODO: show error in a nicer way! alert(error); } else { - this.setState({ palette }); + this.setState({ + palette: palette.map((color) => color.toString()), + }); } }); }