Skip to content

Commit

Permalink
Rename to profile in tracking file
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoginth committed Nov 23, 2024
1 parent 6a35874 commit 89789c7
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/components/Account/FeedType.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const FeedType: FC<FeedTypeProps> = ({ feedType, setFeedType }) => {
if (setFeedType) {
setFeedType(type);
}
Leafwatch.track(ACCOUNT.SWITCH_PROFILE_FEED_TAB, {
profile_feed_type: type.toLowerCase()
Leafwatch.track(ACCOUNT.SWITCH_ACCOUNT_FEED_TAB, {
accountFeedType: type.toLowerCase()
});
};

Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Account/Menu/CopyAddress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const CopyAddress: FC<CopyAddressProps> = ({ address }) => {
stopEventPropagation(event);
await navigator.clipboard.writeText(address);
toast.success("Address copied to clipboard!");
Leafwatch.track(ACCOUNT.COPY_PROFILE_ADDRESS, { address });
Leafwatch.track(ACCOUNT.COPY_ACCOUNT_ADDRESS, { address });
}}
>
<WalletIcon className="size-4" />
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Account/Menu/CopyID.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const CopyID: FC<CopyIDProps> = ({ id }) => {
stopEventPropagation(event);
await navigator.clipboard.writeText(id);
toast.success("ID copied to clipboard!");
Leafwatch.track(ACCOUNT.COPY_PROFILE_ID, { accountId: id });
Leafwatch.track(ACCOUNT.COPY_ACCOUNT_ID, { accountId: id });
}}
>
<HashtagIcon className="size-4" />
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Account/Menu/CopyLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const CopyLink: FC<CopyLinkProps> = ({ account }) => {
`${location.origin}${getAccount(account).link}`
);
toast.success("Link copied to clipboard!");
Leafwatch.track(ACCOUNT.COPY_PROFILE_LINK, { accountId: account.id });
Leafwatch.track(ACCOUNT.COPY_ACCOUNT_LINK, { accountId: account.id });
}}
>
<LinkIcon className="size-4" />
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Home/Sidebar/WhoToFollow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const WhoToFollow: FC = () => {
className="ld-text-gray-500 font-bold"
onClick={() => {
setShowMore(true);
Leafwatch.track(ACCOUNT.OPEN_RECOMMENDED_PROFILES);
Leafwatch.track(ACCOUNT.OPEN_RECOMMENDED_ACCOUNTS);
}}
type="button"
>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/List/Accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const Accounts: FC<AccountsProps> = ({ listId, name }) => {
account={member as Profile}
showBio
showUserPreview={false}
source={AccountLinkSource.ListProfiles}
source={AccountLinkSource.ListAccounts}
/>
</div>
)}
Expand Down
8 changes: 4 additions & 4 deletions apps/web/src/components/Shared/DismissRecommendedAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ interface DismissRecommendedAccountProps {
const DismissRecommendedAccount: FC<DismissRecommendedAccountProps> = ({
account
}) => {
const [dismissRecommendedProfile] = useDismissRecommendedProfilesMutation({
const [dismissRecommendedAccount] = useDismissRecommendedProfilesMutation({
update: (cache) => {
cache.evict({ id: cache.identify(account) });
},
variables: { request: { dismiss: [account.id] } }
});

const handleDismiss = async () => {
await dismissRecommendedProfile();
Leafwatch.track(ACCOUNT.DISMISS_RECOMMENDED_PROFILE, {
target: account.id
await dismissRecommendedAccount();
Leafwatch.track(ACCOUNT.DISMISS_RECOMMENDED_ACCOUNT, {
accountId: account.id
});
};

Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Shared/SwitchAccounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const SwitchAccounts: FC = () => {
const identityToken = auth.data?.authenticate.identityToken;
signOut();
signIn({ accessToken, identityToken, refreshToken });
Leafwatch.track(ACCOUNT.SWITCH_PROFILE, { switch_profile_to: id });
Leafwatch.track(ACCOUNT.SWITCH_ACCOUNT, { accountId: id });
reload();
} catch (error) {
onError(error);
Expand Down
34 changes: 17 additions & 17 deletions packages/data/tracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ export const AUTH = {
};

export const ACCOUNT = {
BLOCK: "Block profile",
COPY_PROFILE_ADDRESS: "Copy profile address",
COPY_PROFILE_ID: "Copy profile ID",
COPY_PROFILE_LINK: "Copy profile link",
DISMISS_RECOMMENDED_PROFILE: "Dismiss recommended profile",
FOLLOW: "Follow profile",
OPEN_RECOMMENDED_PROFILES: "Open recommended profiles modal",
BLOCK: "Block account",
COPY_ACCOUNT_ADDRESS: "Copy account address",
COPY_ACCOUNT_ID: "Copy account ID",
COPY_ACCOUNT_LINK: "Copy account link",
DISMISS_RECOMMENDED_ACCOUNT: "Dismiss recommended account",
FOLLOW: "Follow account",
OPEN_RECOMMENDED_ACCOUNTS: "Open recommended accounts modal",
OPEN_SUPER_FOLLOW: "Open super follow modal",
RECOMMENDED: "Recommended the profile",
REPORT: "Report profile",
SUPER_FOLLOW: "Super follow profile",
SWITCH_PROFILE: "Switch profile",
SWITCH_PROFILE_FEED_TAB: "Switch profile feed tab",
SWITCH_PROFILE_STATS_TAB: "Switch profile stats tab",
UNBLOCK: "Unblock profile",
UNFOLLOW: "Unfollow profile",
UNRECOMENDED: "Unrecommended the profile",
RECOMMENDED: "Recommended the account",
REPORT: "Report account",
SUPER_FOLLOW: "Super follow account",
SWITCH_ACCOUNT: "Switch account",
SWITCH_ACCOUNT_FEED_TAB: "Switch account feed tab",
SWITCH_ACCOUNT_STATS_TAB: "Switch account stats tab",
UNBLOCK: "Unblock account",
UNFOLLOW: "Unfollow account",
UNRECOMENDED: "Unrecommended the account",
OPEN_FOLLOWERS: "Open followers modal",
OPEN_FOLLOWING: "Open following modal",
OPEN_MUTUAL_FOLLOWERS: "Open mutual followers modal"
Expand Down Expand Up @@ -258,5 +258,5 @@ export enum AccountLinkSource {
Search = "search",
StaffPicks = "staff-picks",
WhoToFollow = "who-to-follow",
ListProfiles = "list-profiles"
ListAccounts = "list-accounts"
}

1 comment on commit 89789c7

@vercel
Copy link

@vercel vercel bot commented on 89789c7 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 – ./

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

Please sign in to comment.