|
|
|
@ -38,7 +38,7 @@ const App = () => { |
|
|
|
|
clientInstanceRef.current = clientInstance; |
|
|
|
|
const contractsRef = useRef(contracts); |
|
|
|
|
contractsRef.current = contracts; |
|
|
|
|
const [themeType, setThemeType] = useState<string>("dark") |
|
|
|
|
const [themeType, setThemeType] = useState<string>("dark"); |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
console.log("Remix EthDoc loading..."); |
|
|
|
@ -78,16 +78,15 @@ const App = () => { |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
const currentTheme = await client.call("theme", "currentTheme") |
|
|
|
|
console.log("Current theme", currentTheme) |
|
|
|
|
const currentTheme = await client.call("theme", "currentTheme"); |
|
|
|
|
console.log("Current theme", currentTheme); |
|
|
|
|
|
|
|
|
|
setThemeType(currentTheme.brightness || currentTheme.quality) |
|
|
|
|
setThemeType(currentTheme.brightness || currentTheme.quality); |
|
|
|
|
|
|
|
|
|
client.on("theme", "themeChanged", (theme: any) => { |
|
|
|
|
console.log("themeChanged") |
|
|
|
|
setThemeType(theme.quality) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
console.log("themeChanged"); |
|
|
|
|
setThemeType(theme.quality); |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
loadClient(); |
|
|
|
@ -101,7 +100,7 @@ const App = () => { |
|
|
|
|
setContracts, |
|
|
|
|
sites, |
|
|
|
|
setSites, |
|
|
|
|
themeType |
|
|
|
|
themeType, |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
<Routes /> |
|
|
|
|