From 024eb5760360fd0f5c3bf8251ff0ba6cfbc31eeb Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Sat, 12 Jan 2019 12:18:48 -0500 Subject: [PATCH] Renaming mutation to a more imperative name --- src/components/AppContext/index.js | 2 +- src/components/SVG/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/AppContext/index.js b/src/components/AppContext/index.js index 0207df5..7e0737d 100644 --- a/src/components/AppContext/index.js +++ b/src/components/AppContext/index.js @@ -76,7 +76,7 @@ class AppContextProvider extends React.PureComponent { state = {} mutations = { - svgData: async ({ svg, width, height }) => { + setSvgMarkup: async ({ svg, width, height }) => { if (svg !== this.state.svg) { this.setState({ svg, diff --git a/src/components/SVG/index.js b/src/components/SVG/index.js index 966d7f4..e7caa56 100644 --- a/src/components/SVG/index.js +++ b/src/components/SVG/index.js @@ -17,7 +17,7 @@ class SVG extends React.PureComponent { } const svg = this.svgContainer.current.querySelector('svg'); - this.context.svgData({ + this.context.setSvgMarkup({ svg: svg.outerHTML, width: svg.getAttribute('width'), height: svg.getAttribute('height')