Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ const InfoBox = ({ sectionRefs, clubDetail }: InfoBoxProps) => {
{ label: '전화번호', value: clubDetail.presidentPhoneNumber },
{
label: 'SNS',
render: <SnsLinkIcons apiSocialLinks={clubDetail.socialLinks} />,
render: (
<SnsLinkIcons
apiSocialLinks={clubDetail.socialLinks}
clubName={clubDetail.name}
/>
),
},
],
refIndex: INFOTABS_SCROLL_INDEX.CLUB_INFO_TAB,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const ShareButton = ({ clubId }: ShareButtonProps) => {
},
],
});
trackEvent(`${clubDetail.name} 공유하기 버튼 클릭`);
trackEvent('공유하기 버튼 클릭', { clubName: clubDetail.name });
};

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ import React from 'react';
import * as Styled from './SnsLinkIcons.styles';
import { SNS_CONFIG } from '@/constants/snsConfig';
import { SNSPlatform } from '@/types/club';
import useMixpanelTrack from '@/hooks/useMixpanelTrack';

interface SnsLinkIconsProps {
apiSocialLinks: Partial<Record<SNSPlatform, string>>;
clubName?: string;
}

const SnsLinkIcons = ({ apiSocialLinks }: SnsLinkIconsProps) => {
const SnsLinkIcons = ({ apiSocialLinks, clubName }: SnsLinkIconsProps) => {
const trackEvent = useMixpanelTrack();

if (!apiSocialLinks) return null;
return (
<Styled.SnsIconGroup>
Expand All @@ -21,6 +25,12 @@ const SnsLinkIcons = ({ apiSocialLinks }: SnsLinkIconsProps) => {
href={url}
target='_blank'
rel='noreferrer'
onClick={() =>
trackEvent('sns링크 버튼 클릭', {
platform,
clubName,
})
}
>
<Styled.SnsIcon src={config.icon} alt={config.label} />
</Styled.SnsLink>
Expand Down