Renaming mutation to a more imperative name
This commit is contained in:
parent
d589329883
commit
024eb57603
@ -76,7 +76,7 @@ class AppContextProvider extends React.PureComponent {
|
|||||||
state = {}
|
state = {}
|
||||||
|
|
||||||
mutations = {
|
mutations = {
|
||||||
svgData: async ({ svg, width, height }) => {
|
setSvgMarkup: async ({ svg, width, height }) => {
|
||||||
if (svg !== this.state.svg) {
|
if (svg !== this.state.svg) {
|
||||||
this.setState({
|
this.setState({
|
||||||
svg,
|
svg,
|
||||||
|
@ -17,7 +17,7 @@ class SVG extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const svg = this.svgContainer.current.querySelector('svg');
|
const svg = this.svgContainer.current.querySelector('svg');
|
||||||
this.context.svgData({
|
this.context.setSvgMarkup({
|
||||||
svg: svg.outerHTML,
|
svg: svg.outerHTML,
|
||||||
width: svg.getAttribute('width'),
|
width: svg.getAttribute('width'),
|
||||||
height: svg.getAttribute('height')
|
height: svg.getAttribute('height')
|
||||||
|
Loading…
Reference in New Issue
Block a user