Skip to content

Commit e8846ec

Browse files
committed
Replace usePublicProfile with useProfile
1 parent 49b26cf commit e8846ec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/Newsfeed/Newsfeed.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default function Newsfeed() {
2323

2424
const { user } = useAuth()
2525
const uid = user?.uid
26-
const { result: profile, loading } = usePublicProfile(uid)
26+
const result = useProfile()
2727
const isUser = user?.uid !== undefined
2828

2929
const [isShowingOrgs, setIsShowingOrgs] = useState<boolean>(true)
@@ -192,20 +192,20 @@ export default function Newsfeed() {
192192

193193
return (
194194
<>
195-
{loading ? (
195+
{result.loading && uid ? (
196196
<Row>
197197
<Spinner animation="border" className="mx-auto" />
198198
</Row>
199199
) : (
200200
<>
201-
{profile ? (
201+
{result.profile ? (
202202
<div className={`d-flex align-self-center`}>
203203
<StyledContainer>
204204
<Header>
205205
<HeaderTitle className={`mb-4`}>
206206
{t("navigation.newsfeed")}
207207
</HeaderTitle>
208-
<Filters profile={profile} />
208+
<Filters profile={result.profile} />
209209
</Header>
210210
{filteredResults.length > 0 ? (
211211
<>

0 commit comments

Comments
 (0)