Skip to content

Commit 39b62d8

Browse files
committed
Rename profile to account for v3 preparation
1 parent d7c21d0 commit 39b62d8

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

apps/web/src/components/Home/Sidebar/StaffPicks.tsx

+12-12
Original file line numberDiff line numberDiff line change
@@ -99,22 +99,22 @@ const StaffPicks: FC = () => {
9999
);
100100
}
101101

102-
const profiles = [
102+
const accounts = [
103103
...(staffPicks?.batch1?.items || []),
104104
...(staffPicks?.batch2?.items || []),
105105
...(staffPicks?.batch3?.items || [])
106106
];
107-
const randomProfiles = profiles.sort(() => Math.random() - Math.random());
108-
const filteredProfiles = randomProfiles
107+
const randomAccounts = accounts.sort(() => Math.random() - Math.random());
108+
const filteredAccounts = randomAccounts
109109
.filter(
110-
(profile) =>
111-
!profile.operations.isBlockedByMe.value &&
112-
!profile.operations.isFollowedByMe.value &&
113-
currentAccount?.id !== profile.id
110+
(account) =>
111+
!account.operations.isBlockedByMe.value &&
112+
!account.operations.isFollowedByMe.value &&
113+
currentAccount?.id !== account.id
114114
)
115115
.slice(0, 5);
116116

117-
if (filteredProfiles.length === 0) {
117+
if (filteredAccounts.length === 0) {
118118
return null;
119119
}
120120

@@ -125,12 +125,12 @@ const StaffPicks: FC = () => {
125125
error={picksError || profilesError}
126126
title="Failed to load recommendations"
127127
/>
128-
{filteredProfiles.map((profile) => (
129-
<div className="w-full truncate pr-1" key={profile.id}>
128+
{filteredAccounts.map((account) => (
129+
<div className="w-full truncate pr-1" key={account.id}>
130130
<SingleAccount
131-
hideFollowButton={currentAccount?.id === profile.id}
131+
hideFollowButton={currentAccount?.id === account.id}
132132
hideUnfollowButton
133-
account={profile as Profile}
133+
account={account as Profile}
134134
source={ProfileLinkSource.StaffPicks}
135135
/>
136136
</div>

0 commit comments

Comments
 (0)