Fix bugs
This commit is contained in:
parent
3686f1effb
commit
745191f092
|
@ -19,7 +19,7 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
"waterloo-start-basic": "react-scripts start",
|
"start-basic": "react-scripts start",
|
||||||
"build": "react-scripts build",
|
"build": "react-scripts build",
|
||||||
"test": "react-scripts test",
|
"test": "react-scripts test",
|
||||||
"eject": "react-scripts eject"
|
"eject": "react-scripts eject"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { BurnerPluginContext, Plugin } from '@burner-wallet/types';
|
import { BurnerPluginContext, Plugin, Actions } from '@burner-wallet/types';
|
||||||
import MyPage from './ui/MyPage';
|
import MyPage from './ui/MyPage';
|
||||||
import MyElement from './ui/MyElement';
|
import MyElement from './ui/MyElement';
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ interface PluginActionContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class MyPlugin implements Plugin {
|
export default class MyPlugin implements Plugin {
|
||||||
private pluginContext: BurnerPluginContext;
|
private pluginContext?: BurnerPluginContext;
|
||||||
|
|
||||||
initializePlugin(pluginContext: BurnerPluginContext) {
|
initializePlugin(pluginContext: BurnerPluginContext) {
|
||||||
this.pluginContext = pluginContext;
|
this.pluginContext = pluginContext;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { BurnerContext } from '@burner-wallet/types';
|
import { PluginElementContext } from '@burner-wallet/types';
|
||||||
import MyPlugin from '../MyPlugin';
|
import MyPlugin from '../MyPlugin';
|
||||||
|
|
||||||
const MyElement: React.FC<BurnerContext> = ({ plugin }) => {
|
const MyElement: React.FC<PluginElementContext> = ({ plugin }) => {
|
||||||
const [block, setBlock] = useState<string | null>(null);
|
const [block, setBlock] = useState<string | null>(null);
|
||||||
const _plugin = plugin as MyPlugin;
|
const _plugin = plugin as MyPlugin;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue