Fix profiles not loading.

This commit is contained in:
Paul
2021-08-05 23:25:49 +01:00
parent 2847318294
commit d841b9e3cd
3 changed files with 82 additions and 36 deletions

View File

@@ -57,13 +57,13 @@
gap: 8px;
display: flex;
padding: 0 1.5em;
font-size: .875rem;
font-size: 0.875rem;
> div {
padding: 8px;
cursor: pointer;
border-bottom: 2px solid transparent;
transition: border-bottom .3s;
transition: border-bottom 0.3s;
&[data-active="true"] {
border-bottom: 2px solid var(--foreground);
@@ -81,7 +81,10 @@
height: 100%;
display: flex;
padding: 1em 1.5em;
max-width: 560px;
max-height: 240px;
overflow-y: auto;
flex-direction: column;
background: var(--primary-background);
@@ -141,7 +144,7 @@
display: flex;
cursor: pointer;
align-items: center;
transition: background-color .1s;
transition: background-color 0.1s;
color: var(--secondary-foreground);
border-radius: var(--border-radius);
background-color: var(--secondary-background);

View File

@@ -75,13 +75,14 @@ export const UserProfile = observer(
if (!user_id) return;
if (typeof profile !== "undefined") setProfile(undefined);
if (typeof mutual !== "undefined") setMutual(undefined);
}, [user_id, mutual, profile]);
// eslint-disable-next-line
}, [user_id]);
if (dummy) {
useLayoutEffect(() => {
useEffect(() => {
if (dummy) {
setProfile(dummyProfile);
}, [dummyProfile]);
}
}
}, [dummy, dummyProfile]);
useEffect(() => {
if (dummy) return;