File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 11import React from "react" ;
2+ import { useEffect } from "react" ;
23import styled from "styled-components" ;
34import { Fieldset , Panel } from "react95" ;
45
@@ -39,9 +40,15 @@ const FooterPanel = styled(Panel)`
3940` ;
4041
4142const Main = ( ) => {
42- const { selectedContract : contract } = Contracts . useContainer ( ) ;
43- useQueryStringContract ( )
44-
43+ const { selectedContract : contract , overwriteContract } =
44+ Contracts . useContainer ( ) ;
45+ useQueryStringContract ( ) ;
46+ useEffect ( ( ) => {
47+ let result = localStorage . getItem ( "contracts" ) ;
48+ result = `{"data":${ result } }` ;
49+ let jsonResult = JSON . parse ( result ) . data ;
50+ overwriteContract ( jsonResult ) ;
51+ } , [ contract ] ) ;
4552 return (
4653 < Container >
4754 < ContentFrame label = { contract && contract . name } >
You can’t perform that action at this time.
0 commit comments