Skip to content

Commit 6817a1a

Browse files
authored
Merge pull request #170 from wafflestudio/166-bug-deploy
라우트 수정
2 parents e92b7a4 + 1c309ac commit 6817a1a

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/widgets/profile-header/ui/ProfileAvatar.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ type ProfileAvatarProps = {
99
nickname: string
1010
hasStory?: boolean
1111
hasUnseenStory?: boolean
12-
firstStoryId?: number
12+
userId?: number
1313
}
1414

1515
export function ProfileAvatar({
1616
avatarUrl,
1717
nickname,
1818
hasStory = false,
1919
hasUnseenStory = false,
20-
firstStoryId,
20+
userId,
2121
}: ProfileAvatarProps) {
2222
const avatarContent = avatarUrl ? (
2323
<img
@@ -51,12 +51,9 @@ export function ProfileAvatar({
5151
</div>
5252
)
5353

54-
if (firstStoryId) {
54+
if (userId) {
5555
return (
56-
<Link
57-
to="/stories/$profile_name/$story_id"
58-
params={{ profile_name: nickname, story_id: String(firstStoryId) }}
59-
>
56+
<Link to="/stories/$user_id" params={{ user_id: String(userId) }}>
6057
{content}
6158
</Link>
6259
)

src/widgets/profile-header/ui/ProfileHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function ProfileHeader({
8585
nickname={nickname}
8686
hasStory={hasStory}
8787
hasUnseenStory={userStoriesData?.hasUnseenStory}
88-
firstStoryId={userStoriesData?.stories[0]?.id}
88+
userId={userId}
8989
/>
9090
</div>
9191

0 commit comments

Comments
 (0)