Updated a lot of stuff
This commit is contained in:
parent
4ee57ab459
commit
c0102df54f
44 changed files with 1610 additions and 707 deletions
|
|
@ -10,11 +10,18 @@ export default function Wrapper(props: {
|
|||
|
||||
React.useEffect(() => {
|
||||
let active = true;
|
||||
get(props.userId).then((value) => {
|
||||
if (active) {
|
||||
setUser(value);
|
||||
}
|
||||
});
|
||||
|
||||
void get(props.userId)
|
||||
.then((value) => {
|
||||
if (active) {
|
||||
setUser(value);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
if (active) {
|
||||
setUser(null);
|
||||
}
|
||||
});
|
||||
|
||||
return () => {
|
||||
active = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue