mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-27 00:19:55 +03:00
stash
This commit is contained in:
parent
084f9b9429
commit
7b4698225b
|
@ -1,19 +1,20 @@
|
|||
import React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import Options from './Options';
|
||||
import OptionsComponent from './Options';
|
||||
import { Options } from './syncOptions';
|
||||
|
||||
import '../../views/options.pug';
|
||||
|
||||
chrome.runtime.getBackgroundPage((background) => {
|
||||
const syncOptions = background.syncOptions;
|
||||
|
||||
const saveOption = (name, value) => {
|
||||
const saveOption = <K extends keyof Options>(name: K, value: Options[K]) => {
|
||||
syncOptions.save(name, value);
|
||||
};
|
||||
|
||||
const renderOptions = (options) => {
|
||||
const renderOptions = (options: Options) => {
|
||||
render(
|
||||
<Options options={options} saveOption={saveOption} />,
|
||||
<OptionsComponent options={options} saveOption={saveOption} />,
|
||||
document.getElementById('root')
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user