Skip to content

Commit 240d77c

Browse files
authored
fix: profile pull to refresh (#2059)
1 parent cc92fb0 commit 240d77c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/routes/pages/profile/ProfilePage.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
IonButton,
33
IonButtons,
4-
IonContent,
54
IonIcon,
65
IonTitle,
76
IonToolbar,
@@ -15,6 +14,7 @@ import {
1514
userHandleSelector,
1615
} from "#/features/auth/authSelectors";
1716
import { SharedDialogContext } from "#/features/auth/SharedDialogContext";
17+
import { getSite } from "#/features/auth/siteSlice";
1818
import AppHeader from "#/features/shared/AppHeader";
1919
import { CenteredSpinner } from "#/features/shared/CenteredSpinner";
2020
import DocumentTitle from "#/features/shared/DocumentTitle";
@@ -23,7 +23,8 @@ import Profile from "#/features/user/Profile";
2323
import ProfilePageActions from "#/features/user/ProfilePageActions";
2424
import { AppPage } from "#/helpers/AppPage";
2525
import { isIosTheme } from "#/helpers/device";
26-
import { useAppSelector } from "#/store";
26+
import FeedContent from "#/routes/pages/shared/FeedContent";
27+
import { useAppDispatch, useAppSelector } from "#/store";
2728

2829
export default function ProfilePage() {
2930
const accountsListEmpty = useAppSelector(accountsListEmptySelector);
@@ -32,6 +33,7 @@ export default function ProfilePage() {
3233
(state) => state.auth.connectedInstance,
3334
);
3435
const loggedIn = useAppSelector(loggedInSelector);
36+
const dispatch = useAppDispatch();
3537

3638
const { presentAccountSwitcher } = use(SharedDialogContext);
3739

@@ -50,6 +52,7 @@ export default function ProfilePage() {
5052
person: myPerson.local_user_view.person,
5153
counts: myPerson.local_user_view.counts,
5254
}}
55+
onPull={() => dispatch(getSite()) satisfies Promise<void>}
5356
/>
5457
);
5558
}
@@ -81,7 +84,7 @@ export default function ProfilePage() {
8184
</IonToolbar>
8285
</AppHeader>
8386

84-
<IonContent>{renderContent()}</IonContent>
87+
<FeedContent>{renderContent()}</FeedContent>
8588
</AppPage>
8689
);
8790
}

0 commit comments

Comments
 (0)