Redux toolkit (#115)
* add @redux/toolkit * bump react version to allow for hooks * add remote-redux devtools to help track extension state * add remote-redux server to allow for remote state viewing * setup react-redux for current user * setup watch mode for running redux remote dev watch to options * move screenshots
This commit is contained in:
@@ -1,14 +1,21 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { Provider } from 'react-redux';
|
||||
import createStore from './stores/createStore';
|
||||
import checkCurrentUser from './utils/checkCurrentUser';
|
||||
const container = document.getElementById('wakatime');
|
||||
|
||||
const store = createStore('WakaTime-Options');
|
||||
checkCurrentUser(store)(30 * 1000);
|
||||
|
||||
const openOptions = async (): Promise<void> => {
|
||||
await browser.runtime.openOptionsPage();
|
||||
};
|
||||
|
||||
ReactDOM.render(
|
||||
<>
|
||||
<Provider store={store}>
|
||||
<h1>POPUP GO HERE</h1>
|
||||
<div onClick={openOptions}>Open options</div>
|
||||
</>,
|
||||
</Provider>,
|
||||
container,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user