Skip to content

Commit cf651fb

Browse files
authored
Merge pull request #197 from Gachon-Univ-Creative-Code-Innovation/feat/connect-add-follow-routing
팔로우 라우팅 추가
2 parents ae7909b + e4c6919 commit cf651fb

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

src/screens/FollowPage/FollowPage.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { useState, useEffect, useRef, useCallback } from "react";
2+
import { useNavigate } from "react-router-dom";
23
import FollowTab from "../../components/FollowTab/FollowTab";
34
import FollowDelete from "../../components/FollowDelete/FollowDelete";
45
import PageTransitionWrapper from "../../components/PageTransitionWrapper/PageTransitionWrapper";
@@ -8,6 +9,7 @@ import api from "../../api/instance";
89
import "./FollowPage.css";
910

1011
export const FollowPage = () => {
12+
const navigate = useNavigate();
1113
const [followers, setFollowers] = useState([]);
1214
const [followees, setFollowees] = useState([]);
1315
const [page, setPage] = useState(1);
@@ -174,7 +176,11 @@ export const FollowPage = () => {
174176
key={user.id}
175177
ref={idx === visibleUsers.length - 1 ? lastUserRef : null}
176178
>
177-
<div className="followpage-user-info">
179+
<div
180+
className="followpage-user-info"
181+
onClick={() => navigate(`/blog/${user.id}`)}
182+
style={{ cursor: "pointer" }}
183+
>
178184
<img
179185
src={detail?.profileUrl || "/img/basic_profile_photo.png"}
180186
alt="profile"

src/screens/MyBlog/MyBlog.jsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,19 @@ export const MyBlog = () => {
190190
/>
191191
</div>
192192
<div className="myblog-follow-info">
193-
<div className="myblog-follow-box">
193+
<div
194+
className="myblog-follow-box"
195+
onClick={() => navigate("/follow")}
196+
style={{ cursor: "pointer" }}
197+
>
194198
<div className="myblog-follow-label">팔로워</div>
195199
<div className="myblog-follow-count">{followerCount}</div>
196200
</div>
197-
<div className="myblog-follow-box">
201+
<div
202+
className="myblog-follow-box"
203+
onClick={() => navigate("/follow")}
204+
style={{ cursor: "pointer" }}
205+
>
198206
<div className="myblog-follow-label">팔로잉</div>
199207
<div className="myblog-follow-count">{followingCount}</div>
200208
</div>

0 commit comments

Comments
 (0)