Skip to content

Commit

Permalink
Rename ProfileLinkSource to AccountLinkSource
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoginth committed Nov 23, 2024
1 parent 39b62d8 commit 6a35874
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/components/Club/Members.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import AccountListShimmer from "@components/Shared/Shimmer/AccountListShimmer";
import SingleAccount from "@components/Shared/SingleAccount";
import { ArrowLeftIcon, UsersIcon } from "@heroicons/react/24/outline";
import { HEY_API_URL } from "@hey/data/constants";
import { ProfileLinkSource } from "@hey/data/tracking";
import { AccountLinkSource } from "@hey/data/tracking";
import { type Profile, useProfilesQuery } from "@hey/lens";
import type { ClubProfile } from "@hey/types/club";
import { Card, EmptyState, ErrorMessage, H5 } from "@hey/ui";
Expand Down Expand Up @@ -118,7 +118,7 @@ const Members: FC<MembersProps> = ({ clubId, handle }) => {
account={member as Profile}
showBio
showUserPreview={false}
source={ProfileLinkSource.ClubMembers}
source={AccountLinkSource.ClubMembers}
/>
</div>
)}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Home/Sidebar/StaffPicks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import SingleAccountShimmer from "@components/Shared/Shimmer/SingleAccountShimme
import SingleAccount from "@components/Shared/SingleAccount";
import { CursorArrowRippleIcon as CursorArrowRippleIconOutline } from "@heroicons/react/24/outline";
import { HEY_API_URL } from "@hey/data/constants";
import { ProfileLinkSource } from "@hey/data/tracking";
import { AccountLinkSource } from "@hey/data/tracking";
import type { Profile } from "@hey/lens";
import { useStaffPicksQuery } from "@hey/lens";
import type { StaffPick } from "@hey/types/hey";
Expand Down Expand Up @@ -131,7 +131,7 @@ const StaffPicks: FC = () => {
hideFollowButton={currentAccount?.id === account.id}
hideUnfollowButton
account={account as Profile}
source={ProfileLinkSource.StaffPicks}
source={AccountLinkSource.StaffPicks}
/>
</div>
))}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Home/Sidebar/WhoToFollow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import DismissRecommendedAccount from "@components/Shared/DismissRecommendedAcco
import SingleAccountShimmer from "@components/Shared/Shimmer/SingleAccountShimmer";
import SingleAccount from "@components/Shared/SingleAccount";
import { Leafwatch } from "@helpers/leafwatch";
import { ACCOUNT, ProfileLinkSource } from "@hey/data/tracking";
import { ACCOUNT, AccountLinkSource } from "@hey/data/tracking";
import type { Profile } from "@hey/lens";
import { LimitType, useProfileRecommendationsQuery } from "@hey/lens";
import { Card, ErrorMessage, H5, Modal } from "@hey/ui";
Expand Down Expand Up @@ -72,7 +72,7 @@ const WhoToFollow: FC = () => {
hideFollowButton={currentAccount?.id === account.id}
hideUnfollowButton={currentAccount?.id === account.id}
account={account as Profile}
source={ProfileLinkSource.WhoToFollow}
source={AccountLinkSource.WhoToFollow}
/>
</div>
<DismissRecommendedAccount account={account as Profile} />
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Home/Suggested.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import DismissRecommendedAccount from "@components/Shared/DismissRecommendedAccount";
import SingleAccount from "@components/Shared/SingleAccount";
import { UsersIcon } from "@heroicons/react/24/outline";
import { ProfileLinkSource } from "@hey/data/tracking";
import { AccountLinkSource } from "@hey/data/tracking";
import type { Profile } from "@hey/lens";
import { EmptyState } from "@hey/ui";
import type { FC } from "react";
Expand Down Expand Up @@ -41,7 +41,7 @@ const Suggested: FC<SuggestedProps> = ({ accounts }) => {
account={account as Profile}
showBio
showUserPreview={false}
source={ProfileLinkSource.WhoToFollow}
source={AccountLinkSource.WhoToFollow}
/>
</div>
<DismissRecommendedAccount account={account as Profile} />
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/List/Accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import AccountListShimmer from "@components/Shared/Shimmer/AccountListShimmer";
import SingleAccount from "@components/Shared/SingleAccount";
import { ArrowLeftIcon, UsersIcon } from "@heroicons/react/24/outline";
import { HEY_API_URL } from "@hey/data/constants";
import { ProfileLinkSource } from "@hey/data/tracking";
import { AccountLinkSource } from "@hey/data/tracking";
import { type Profile, useProfilesQuery } from "@hey/lens";
import { Card, EmptyState, ErrorMessage, H5 } from "@hey/ui";
import { useQuery } from "@tanstack/react-query";
Expand Down Expand Up @@ -108,7 +108,7 @@ const Accounts: FC<AccountsProps> = ({ listId, name }) => {
account={member as Profile}
showBio
showUserPreview={false}
source={ProfileLinkSource.ListProfiles}
source={AccountLinkSource.ListProfiles}
/>
</div>
)}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Post/MoreRelevantPeople.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import SingleAccount from "@components/Shared/SingleAccount";
import { ProfileLinkSource } from "@hey/data/tracking";
import { AccountLinkSource } from "@hey/data/tracking";
import type { Profile } from "@hey/lens";
import type { FC } from "react";
import { Virtuoso } from "react-virtuoso";
Expand Down Expand Up @@ -27,7 +27,7 @@ const MoreRelevantPeople: FC<MoreRelevantPeopleProps> = ({ accounts }) => {
account={account as Profile}
showBio
showUserPreview={false}
source={ProfileLinkSource.WhoToFollow}
source={AccountLinkSource.WhoToFollow}
/>
</div>
)}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Post/RelevantPeople.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import SingleAccountShimmer from "@components/Shared/Shimmer/SingleAccountShimmer";
import SingleAccount from "@components/Shared/SingleAccount";
import { ProfileLinkSource } from "@hey/data/tracking";
import { AccountLinkSource } from "@hey/data/tracking";
import type { Profile, ProfileMentioned } from "@hey/lens";
import { useProfilesQuery } from "@hey/lens";
import { Card, ErrorMessage, Modal } from "@hey/ui";
Expand Down Expand Up @@ -62,7 +62,7 @@ const RelevantPeople: FC<RelevantPeopleProps> = ({ profilesMentioned }) => {
hideUnfollowButton={currentAccount?.id === account.id}
account={account as Profile}
showUserPreview={false}
source={ProfileLinkSource.RelevantPeople}
source={AccountLinkSource.RelevantPeople}
/>
</div>
))}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Post/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import PostStaffTool from "@components/StaffTools/Panels/Post";
import { Leafwatch } from "@helpers/leafwatch";
import { APP_NAME } from "@hey/data/constants";
import { FeatureFlag } from "@hey/data/feature-flags";
import { PAGEVIEW, ProfileLinkSource } from "@hey/data/tracking";
import { AccountLinkSource, PAGEVIEW } from "@hey/data/tracking";
import getAccount from "@hey/helpers/getAccount";
import getPostData from "@hey/helpers/getPostData";
import { isRepost } from "@hey/helpers/postHelpers";
Expand Down Expand Up @@ -147,7 +147,7 @@ const ViewPost: NextPage = () => {
hideUnfollowButton={currentAccount?.id === targetPost.by.id}
account={targetPost.by}
showBio
source={ProfileLinkSource.Post}
source={AccountLinkSource.Post}
/>
</Card>
<RelevantPeople profilesMentioned={targetPost.profilesMentioned} />
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Search/Accounts.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import SingleAccountsShimmer from "@components/Shared/Shimmer/SingleAccountsShimmer";
import SingleAccount from "@components/Shared/SingleAccount";
import { UsersIcon } from "@heroicons/react/24/outline";
import { ProfileLinkSource } from "@hey/data/tracking";
import { AccountLinkSource } from "@hey/data/tracking";
import type { Profile, ProfileSearchRequest } from "@hey/lens";
import {
CustomFiltersType,
Expand Down Expand Up @@ -76,7 +76,7 @@ const Accounts: FC<AccountsProps> = ({ query }) => {
isBig
account={account as Profile}
showBio
source={ProfileLinkSource.Search}
source={AccountLinkSource.Search}
/>
</Card>
)}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Shared/Modal/Collectors.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import AccountListShimmer from "@components/Shared/Shimmer/AccountListShimmer";
import SingleAccount from "@components/Shared/SingleAccount";
import { ShoppingBagIcon } from "@heroicons/react/24/outline";
import { ProfileLinkSource } from "@hey/data/tracking";
import { AccountLinkSource } from "@hey/data/tracking";
import type { Profile, WhoActedOnPublicationRequest } from "@hey/lens";
import {
LimitType,
Expand Down Expand Up @@ -83,7 +83,7 @@ const Collectors: FC<CollectorsProps> = ({ postId }) => {
account={account as Profile}
showBio
showUserPreview={false}
source={ProfileLinkSource.Collects}
source={AccountLinkSource.Collects}
/>
</div>
)}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Shared/Modal/Followers.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import AccountListShimmer from "@components/Shared/Shimmer/AccountListShimmer";
import SingleAccount from "@components/Shared/SingleAccount";
import { UsersIcon } from "@heroicons/react/24/outline";
import { ProfileLinkSource } from "@hey/data/tracking";
import { AccountLinkSource } from "@hey/data/tracking";
import type { FollowersRequest, Profile } from "@hey/lens";
import { LimitType, useFollowersQuery } from "@hey/lens";
import { EmptyState, ErrorMessage } from "@hey/ui";
Expand Down Expand Up @@ -82,7 +82,7 @@ const Followers: FC<FollowersProps> = ({ handle, accountId }) => {
account={follower as Profile}
showBio
showUserPreview={false}
source={ProfileLinkSource.Followers}
source={AccountLinkSource.Followers}
/>
</div>
)}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Shared/Modal/Following.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import AccountListShimmer from "@components/Shared/Shimmer/AccountListShimmer";
import SingleAccount from "@components/Shared/SingleAccount";
import { UsersIcon } from "@heroicons/react/24/outline";
import { ProfileLinkSource } from "@hey/data/tracking";
import { AccountLinkSource } from "@hey/data/tracking";
import type { FollowingRequest, Profile } from "@hey/lens";
import { LimitType, useFollowingQuery } from "@hey/lens";
import { EmptyState, ErrorMessage } from "@hey/ui";
Expand Down Expand Up @@ -81,7 +81,7 @@ const Following: FC<FollowingProps> = ({ handle, accountId }) => {
account={following as Profile}
showBio
showUserPreview={false}
source={ProfileLinkSource.Following}
source={AccountLinkSource.Following}
/>
</div>
)}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Shared/Modal/Likes.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import AccountListShimmer from "@components/Shared/Shimmer/AccountListShimmer";
import SingleAccount from "@components/Shared/SingleAccount";
import { HeartIcon } from "@heroicons/react/24/outline";
import { ProfileLinkSource } from "@hey/data/tracking";
import { AccountLinkSource } from "@hey/data/tracking";
import {
LimitType,
type Profile,
Expand Down Expand Up @@ -82,7 +82,7 @@ const Likes: FC<LikesProps> = ({ postId }) => {
account={like.profile as Profile}
showBio
showUserPreview={false}
source={ProfileLinkSource.Likes}
source={AccountLinkSource.Likes}
/>
</div>
)}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Shared/Modal/Mirrors.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import AccountListShimmer from "@components/Shared/Shimmer/AccountListShimmer";
import SingleAccount from "@components/Shared/SingleAccount";
import { ArrowsRightLeftIcon } from "@heroicons/react/24/outline";
import { ProfileLinkSource } from "@hey/data/tracking";
import { AccountLinkSource } from "@hey/data/tracking";
import type { Profile, ProfilesRequest } from "@hey/lens";
import { LimitType, useProfilesQuery } from "@hey/lens";
import { EmptyState, ErrorMessage } from "@hey/ui";
Expand Down Expand Up @@ -78,7 +78,7 @@ const Mirrors: FC<MirrorsProps> = ({ postId }) => {
account={account as Profile}
showBio
showUserPreview={false}
source={ProfileLinkSource.Mirrors}
source={AccountLinkSource.Mirrors}
/>
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Loader from "@components/Shared/Loader";
import SingleAccount from "@components/Shared/SingleAccount";
import { Leafwatch } from "@helpers/leafwatch";
import { XMarkIcon } from "@heroicons/react/24/outline";
import { ProfileLinkSource, SEARCH } from "@hey/data/tracking";
import { AccountLinkSource, SEARCH } from "@hey/data/tracking";
import getAccount from "@hey/helpers/getAccount";
import stopEventPropagation from "@hey/helpers/stopEventPropagation";
import type { Profile } from "@hey/lens";
Expand Down Expand Up @@ -71,7 +71,7 @@ const RecentAccounts: FC<RecentAccountsProps> = ({ onAccountClick }) => {
linkToAccount={false}
account={profile as Profile}
showUserPreview={false}
source={ProfileLinkSource.RecentSearch}
source={AccountLinkSource.RecentSearch}
/>
</div>
<button
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Shared/Navbar/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Loader from "@components/Shared/Loader";
import SingleAccount from "@components/Shared/SingleAccount";
import { Leafwatch } from "@helpers/leafwatch";
import { MagnifyingGlassIcon, XMarkIcon } from "@heroicons/react/24/outline";
import { ProfileLinkSource, SEARCH } from "@hey/data/tracking";
import { AccountLinkSource, SEARCH } from "@hey/data/tracking";
import getAccount from "@hey/helpers/getAccount";
import type { Profile, ProfileSearchRequest } from "@hey/lens";
import {
Expand Down Expand Up @@ -126,7 +126,7 @@ const Search: FC<SearchProps> = ({ placeholder = "Search…" }) => {
linkToAccount={false}
account={account}
showUserPreview={false}
source={ProfileLinkSource.Search}
source={AccountLinkSource.Search}
/>
</div>
))}
Expand Down
2 changes: 1 addition & 1 deletion packages/data/tracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export const ALL_EVENTS = {
...ONBOARDING
};

export enum ProfileLinkSource {
export enum AccountLinkSource {
ClubMembers = "club-members",
Collects = "collects",
Followers = "followers",
Expand Down

1 comment on commit 6a35874

@vercel
Copy link

@vercel vercel bot commented on 6a35874 Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

web – ./

web-heyxyz.vercel.app
hey.xyz
heyxyz.vercel.app
web-git-main-heyxyz.vercel.app

Please sign in to comment.