From 0d7a7628b3458bfa13492f0e6b0ad88113accdf4 Mon Sep 17 00:00:00 2001 From: Jhen Date: Thu, 4 Aug 2016 17:43:30 +0800 Subject: [PATCH] Reuse remotedev-app/lib/utils/localStorage on DevToolsDock --- app/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/index.js b/app/index.js index 26cf1f6..85f1e4e 100644 --- a/app/index.js +++ b/app/index.js @@ -1,4 +1,7 @@ import React, { Component, PropTypes } from 'react'; +import { + getFromStorage, saveToStorage, +} from 'remotedev-app/lib/utils/localStorage'; import { render } from 'react-dom'; import Dock from 'react-dock'; import DevTools from './DevTools'; @@ -22,7 +25,7 @@ class DevToolsDock extends Component { handleSizeChange = eventSize => { let size = eventSize > 1 ? 1 : eventSize; size = size < 0.1 ? 0.1 : size; - localStorage.setItem(dockSizeKey, size); + saveToStorage(dockSizeKey, size); this.setState({ size }); }; @@ -44,7 +47,7 @@ class DevToolsDock extends Component { render( , document.getElementById('remote-redux-devtools-on-debugger')