chore: improve compatibility for upgraded packages

This commit is contained in:
josc146
2023-03-19 12:03:04 +08:00
parent e38139bfe7
commit b7634f723e
4 changed files with 31 additions and 8 deletions
+4 -3
View File
@@ -14,9 +14,10 @@ function DecisionCard(props) {
const question = props.question
useEffect(() => {
getUserConfig()
.then(setConfig)
.then(() => setRender(true))
getUserConfig().then((config) => {
setConfig(config)
setRender(true)
})
}, [])
useEffect(() => {
+4 -3
View File
@@ -21,9 +21,10 @@ function FloatingToolbar(props) {
const windowSize = useClampWindowSize([750, 1500], [0, Infinity])
useEffect(() => {
getUserConfig()
.then(setConfig)
.then(() => setRender(true))
getUserConfig().then((config) => {
setConfig(config)
setRender(true)
})
}, [])
useEffect(() => {