Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
e24c89d
feat: mbti 테스트 관련 페이지, 대화 tips 관련 페이지trackedView에 추가
junjeeong Apr 24, 2025
bc90ce4
feat: mbti-test-progress 페이지 useEffect로 페이지 컴포넌트에서 pageView 관리
junjeeong Apr 24, 2025
fa83330
Mbti intro 페이지 시작하기 버튼, Mbti 결과 페이지 돌아가기 버튼+공유하기 버튼 Click 이벤트 추가
junjeeong Apr 24, 2025
b85940f
카카오 로그인 버튼 Click 이벤트 할당
junjeeong Apr 24, 2025
c9c9fc6
chat 페이지의 Chat tips 메뉴바 Click 이벤트 할당
junjeeong Apr 24, 2025
9bb58bf
홈 화면 로그인 버튼 click 이벤트 할당
junjeeong Apr 24, 2025
269cc35
홈 화면, 내 정보 버튼 click 이벤트 할당
junjeeong Apr 24, 2025
5530b4b
Merge branch 'dev' into feature/Ga4-trackedpage-추가-및-click-이벤트-할당-정준영
junjeeong Apr 24, 2025
2dba05c
feat: 홈화면 친구 추가, 친구 삭제, 대화 시작하기 버튼 click 이벤트 할당
junjeeong Apr 24, 2025
72a66df
fix: App.tsx에 trackedPaths 수정
junjeeong Apr 24, 2025
434ffc7
fix: 바이럴 콘텐츠 질문 페이지 매개변수값 수정
junjeeong Apr 24, 2025
b20fe56
fix: 로그인버튼, 내정보 버튼 click 이벤트 매개변수 수정
junjeeong Apr 24, 2025
950832a
fix: 친구 추가, 친구 삭제 매개변수 수정
junjeeong Apr 24, 2025
1730734
fix: 바이럴 콘텐츠 결과 페이지 view, click 이벤트 매개변수 변경
junjeeong Apr 24, 2025
0f7c186
fix: 데이터 태깅 기획에 맞게 page element 수정
junjeeong Apr 24, 2025
de086e4
fix: 데이터 태깅기획과 맞지 않은 element 들 삭제'
junjeeong Apr 27, 2025
1b317cf
chore: 바로 대화하기 버튼 -> 바로 대화하기 오타 수정
junjeeong Apr 27, 2025
46e208e
Merge branch 'dev' into feature/Ga4-trackedpage-추가-및-click-이벤트-할당-정준영
junjeeong Apr 27, 2025
7da200a
feat: 친구 채팅의 경우 친구 이름을 title로 설정
Soohyuniii Apr 28, 2025
52c80f1
Merge branch 'dev' of https://github.com/MBTips/FE-MBTips into feat/친…
Soohyuniii Apr 28, 2025
93fd7f9
fix: remove log
Soohyuniii Apr 28, 2025
42e8c9b
feat: 친구목록에서 채팅화면 이동 시 이름 넘기기
Soohyuniii Apr 28, 2025
b8fe24f
feat: 로그인 시에만 my info 접근 가능하도록 조건 추가
Soohyuniii Apr 28, 2025
78c145c
fix: select info 화면 내 공유하기 버튼 제거
Soohyuniii Apr 28, 2025
f15b3f5
Merge pull request #219 from MBTips/feature/Ga4-trackedpage-추가-및-clic…
junjeeong Apr 28, 2025
d235bac
Merge branch 'dev' of https://github.com/MBTips/FE-MBTips into feat/친…
Soohyuniii Apr 28, 2025
906cc4b
Merge pull request #232 from Soohyuniii/feat/친구-채팅-제목에-이름-띄우기
Soohyuniii Apr 28, 2025
253c750
Merge branch 'dev' of https://github.com/MBTips/FE-MBTips into feat--…
Soohyuniii Apr 28, 2025
bed88b1
Merge pull request #235 from Soohyuniii/feat--로그인-시에만-my-info-접근-가능-작업
Soohyuniii Apr 28, 2025
b56cf6a
Merge branch 'dev' of https://github.com/MBTips/FE-MBTips into fix--s…
Soohyuniii Apr 28, 2025
d0f9d23
Merge pull request #236 from Soohyuniii/fix--select-info-페이지-내-공유하기-버…
Soohyuniii Apr 28, 2025
df1357d
feat: 친구 채팅 history 구현
Soohyuniii Apr 29, 2025
e8249a4
feat: 일반 콘텐츠 header 문구 변경
Soohyuniii Apr 29, 2025
ecd3c2d
fix: 친구 저장하기 버튼 문구와 navigate 수정 및 ga element 변경
Soohyuniii Apr 29, 2025
94e28f5
Merge pull request #237 from Soohyuniii/feat--친구-채팅-내역-가져오기
Soohyuniii Apr 29, 2025
7ae4678
Merge branch 'dev' of https://github.com/MBTips/FE-MBTips into feat/일…
Soohyuniii Apr 29, 2025
7bd13c2
Merge pull request #239 from Soohyuniii/feat/일반-콘텐츠-header-문구-변경
Soohyuniii Apr 29, 2025
c849e78
Merge branch 'dev' of https://github.com/MBTips/FE-MBTips into fix/친구…
Soohyuniii Apr 29, 2025
ba97537
Merge pull request #241 from Soohyuniii/fix/친구저장하기-select-info-버튼-수정
Soohyuniii Apr 29, 2025
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
7 changes: 5 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ const PageTracker = () => {
{ path: "/my-info", page: "내 정보" },
{ path: "/chat", page: "채팅방" },
{ path: "/select-info", page: "빠른 대화 설정" },
{ path: "/select-info", page: "친구 저장" }
{ path: "/mbti-test", page: "바이럴 콘텐츠 소개" },
{ path: "/mbti-result", page: "바이럴 콘텐츠 결과" },
{ path: "/chat-recommend", page: "대화주제추천" },
{ path: "/chat-tips", page: "대화 꿀팁" },
{ path: "/chat-temporature", page: "대화 온도" }
];

useEffect(() => {
Expand Down Expand Up @@ -67,7 +71,6 @@ const PageTracker = () => {
const App = () => {
useEffect(() => {
initGA();
console.log("init");
}, []);

return (
Expand Down
6 changes: 5 additions & 1 deletion src/components/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { SetStateAction } from "react";
import { useNavigate } from "react-router-dom";
import { authInstance } from "@/api/axios";
import { VirtualFriend } from "@/types/virtualFreind";
import trackClickEvent from "@/utils/trackClickEvent";

interface ProfileProps {
info: VirtualFriend;
Expand All @@ -12,6 +13,7 @@ const Profile = ({ info, deleteIndex, setVirtualFriendList }: ProfileProps) => {
const navigate = useNavigate();

const handleDelete = async () => {
trackClickEvent("홈", "친구 - 삭제");
const res = await authInstance.delete(
`/api/virtual-friend/${info.virtualFriendId}`
);
Expand All @@ -23,11 +25,13 @@ const Profile = ({ info, deleteIndex, setVirtualFriendList }: ProfileProps) => {
};

const handleNavigate = () => {
trackClickEvent("홈", "친구 - 바로 대화하기");
navigate("/chat", {
state: {
mode: "virtualFriend",
mbti: info.mbti,
id: info.virtualFriendId
id: info.virtualFriendId,
name: info.virtualFriendName
}
});
};
Expand Down
2 changes: 2 additions & 0 deletions src/components/SubTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useState } from "react";
import { useNavigate } from "react-router-dom";
import trackClickEvent from "@/utils/trackClickEvent";
import ActionConfirmModal from "@/components/modal/ActionConfirmModal";
import useAuthStore from "@/store/useAuthStore";

Expand All @@ -20,6 +21,7 @@ const SubTitle = ({ mode }: { mode: "빠른대화" | "친구목록" }) => {
};

const handleNavigate = () => {
trackClickEvent("홈", "친구 - 추가");
if (isLoggedIn) {
const type = mode === "빠른대화" ? "fastFriend" : "virtualFriend";
navigate("/select-info", { state: { type: type } });
Expand Down
10 changes: 7 additions & 3 deletions src/components/button/ChatStartButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useNavigate } from "react-router-dom";
import { useLocation, useNavigate } from "react-router-dom";
import { trackEvent } from "@/libs/analytics";

type ChatStartButtonProps = {
Expand All @@ -8,13 +8,17 @@ type ChatStartButtonProps = {

const ChatStartButton = ({ mode, mbti }: ChatStartButtonProps) => {
const navigate = useNavigate();
const pathname = useLocation().pathname;

const handleNavigate = () => {
switch (mode) {
case "go-fast":
trackEvent("Click", {
page: "홈",
element: "빠른 대화 시작"
page: pathname === "/mbti-test-result" ? "바이럴 콘텐츠 결과" : "홈",
element:
pathname === "/mbti-test-result"
? "대화 시작하기"
: "빠른 대화 시작"
});
navigate("/select-info", { state: { type: "fastFriend", mbti } });
break;
Expand Down
3 changes: 3 additions & 0 deletions src/components/button/KakaoLoginButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import trackClickEvent from "@/utils/trackClickEvent";

const KakaoLoginButton = () => {
const kakaoRestApiKey = import.meta.env.VITE_KAKAO_REST_API_KEY;
const kakaoRedirectUrl =
Expand All @@ -8,6 +10,7 @@ const KakaoLoginButton = () => {
const kakaoURL = `https://kauth.kakao.com/oauth/authorize?client_id=${kakaoRestApiKey}&redirect_uri=${kakaoRedirectUrl}&response_type=code`;

const handleClick = () => {
trackClickEvent("로그인/회원가입", "로그인");
window.location.href = kakaoURL;
};

Expand Down
12 changes: 9 additions & 3 deletions src/components/button/LoginButton.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import trackClickEvent from "@/utils/trackClickEvent";

const LoginButton = () => {
const handleClick = () => {
trackClickEvent("홈", "로그인");
};

return (
<a href="/login">
<button className="w-[69px] h-[36px] border-[0.8px] border-gray-300 rounded-lg font-bold text-gray-600 text-md">
로그인
<a href="/login" onClick={handleClick}>
<button className="h-[36px] w-[69px] rounded-lg border-[0.8px] border-gray-300 text-md font-bold text-gray-600">
로그인
</button>
</a>
);
Expand Down
25 changes: 14 additions & 11 deletions src/components/button/RestartButton.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import { useNavigate } from "react-router-dom";

const RestartButton = () => {
const navigate = useNavigate();
const navigate = useNavigate();

const goFirstStep = () => {
navigate("/mbti-test");
}
const goFirstStep = () => {
navigate("/mbti-test");
};

return (
<button className="flex justify-center items-center bg-gray-100 rounded-lg w-[72px] h-[60px]" onClick={goFirstStep}>
<img src="/icon/restart.svg" alt="다시하기 버튼" width={24} height={24} />
</button>
)
}
return (
<button
className="flex h-[60px] w-[72px] items-center justify-center rounded-lg bg-gray-100"
onClick={goFirstStep}
>
<img src="/icon/restart.svg" alt="다시하기 버튼" width={24} height={24} />
</button>
);
};

export default RestartButton;
export default RestartButton;
8 changes: 7 additions & 1 deletion src/components/button/ShareButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ import ShareModal from "@/components/modal/ShareModal";
const ShareButton = () => {
const [shareModalIsOpen, setShareModalIsOpen] = useState(false);

const handleClick = () => {
setShareModalIsOpen(true);
};
return (
<>
<button onClick={()=>setShareModalIsOpen(true)} className="flex h-[60px] w-full items-center justify-center rounded-lg border border-primary-light bg-primary-pale font-bold text-primary-normal">
<button
onClick={handleClick}
className="flex h-[60px] w-full items-center justify-center rounded-lg border border-primary-light bg-primary-pale font-bold text-primary-normal"
>
공유하기
</button>
{shareModalIsOpen && (
Expand Down
2 changes: 2 additions & 0 deletions src/components/header/MainHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { Link, useNavigate } from "react-router-dom";
import LoginButton from "@/components/button/LoginButton";
import trackClickEvent from "@/utils/trackClickEvent";

const MainHeader = ({ isLoggedIn }: { isLoggedIn: boolean }) => {
const navigate = useNavigate();

const handleNavigate = () => {
trackClickEvent("홈", "내정보");
navigate("/my-info");
};

Expand Down
11 changes: 10 additions & 1 deletion src/components/tips/TipsMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import trackClickEvent from "@/utils/trackClickEvent";
import { Link } from "react-router-dom";

const TipsMenu = ({
Expand All @@ -6,31 +7,39 @@ const TipsMenu = ({
mode: "topic" | "conversation" | "temporature";
}) => {
let text = "";
let tagElement = "";
let imageUrl = "";
let href = "";

switch (mode) {
case "topic":
text = "대화 주제 추천";
tagElement = "대화 주제 추천";
imageUrl = "/icon/starbubble.svg";
href = "/chat-recommend";
break;
case "conversation":
text = "대화 꿀팁";
tagElement = "대화 꿀팁";
imageUrl = "/icon/lightbulb.svg";
href = "/chat-tips";
break;
case "temporature":
text = "현재 대화의 온도 측정하기";
tagElement = "대화의 온도";
imageUrl = "/icon/thermometer.svg";
href = "/chat-temporature";
break;
default:
return;
}

const handleClick = () => {
trackClickEvent("채팅방", tagElement);
};

return (
<Link to={href}>
<Link to={href} onClick={handleClick}>
<div className="flex h-[56px] w-full border-t border-gray-100 bg-white px-4 py-4 hover:bg-primary-pale">
<img src={imageUrl} alt={text} width={20} height={20} />
<h2 className="text-2lg ml-[22px] font-medium text-gray-800">{text}</h2>
Expand Down
Loading