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
10 changes: 4 additions & 6 deletions src/components/common/MainHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useEffect, useState } from 'react';
import headerLogo from '../../assets/header/header-logo.svg';
import groupDoneLogo from '../../assets/header/group-done.svg';
import findUserLogo from '../../assets/header/findUser.svg';
import bellLogo from '../../assets/header/bell.svg';
import bellExistLogo from '../../assets/header/exist-bell.svg';
Expand Down Expand Up @@ -40,11 +39,10 @@ const MainHeader = ({ type, leftButtonClick, rightButtonClick }: MainHeaderProps
<HeaderWrapper>
<LogoImg src={headerLogo} alt="headerLogo" />
<Actions>
<IconButton
onClick={leftButtonClick}
src={type === 'group' ? groupDoneLogo : findUserLogo}
alt={type === 'group' ? '모임 완료 아이콘' : '사용자 찾기 아이콘'}
/>
{type === 'home' && (
<IconButton onClick={leftButtonClick} src={findUserLogo} alt={'사용자 찾기 아이콘'} />
)}
Comment on lines +42 to +44
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Group 페이지에서 왼쪽 버튼이 렌더링되지 않는 문제

type === 'home' 조건으로 인해 왼쪽 버튼이 'home' 타입일 때만 렌더링됩니다. 그러나 Group.tsx(Line 107)에서는 type="group"과 함께 leftButtonClick 핸들러를 전달하고 있어, 버튼이 렌더링되지 않아 핸들러가 실행될 수 없습니다.

다음 중 하나를 적용하세요:

방안 1: Group 페이지에서도 왼쪽 버튼 렌더링

-        {type === 'home' && (
+        {(type === 'home' || type === 'group') && (
           <IconButton onClick={leftButtonClick} src={findUserLogo} alt={'사용자 찾기 아이콘'} />
         )}

방안 2: Group.tsx에서 불필요한 leftButtonClick 제거
Group.tsx에서 leftButtonClick prop을 제거하고 MyGroupBox의 클릭만 사용

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{type === 'home' && (
<IconButton onClick={leftButtonClick} src={findUserLogo} alt={'사용자 찾기 아이콘'} />
)}
{(type === 'home' || type === 'group') && (
<IconButton onClick={leftButtonClick} src={findUserLogo} alt={'사용자 찾기 아이콘'} />
)}
🤖 Prompt for AI Agents
In src/components/common/MainHeader.tsx around lines 42 to 44, the left
IconButton is only rendered when type === 'home', so pages using type="group"
(like Group.tsx line 107) pass a leftButtonClick handler that never gets
invoked; either render the left button for the group type as well or remove the
unused leftButtonClick prop from Group.tsx. To fix: update the render condition
to include group (e.g., type === 'home' || type === 'group') so the IconButton
is displayed and leftButtonClick will be called, or alternatively remove
leftButtonClick from Group.tsx and rely on MyGroupBox click handling; ensure
props and types are updated accordingly where you choose the approach.


<IconButton
onClick={rightButtonClick}
src={hasUnchecked ? bellExistLogo : bellLogo}
Expand Down
13 changes: 4 additions & 9 deletions src/components/feed/TotalFeed.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import styled from '@emotion/styled';
import { Fragment } from 'react';
import FollowList from './FollowList';
import FeedPost from './FeedPost';
import RecommendedFeedSection from './RecommendedFeedSection';
Expand All @@ -14,19 +15,13 @@ const TotalFeed = ({ showHeader, posts = [], isTotalFeed }: FeedListProps) => {
{hasPosts ? (
<>
{posts.map((post, index) => (
<>
<FeedPost
key={`${post.feedId}-${index}`}
showHeader={showHeader}
isMyFeed={isTotalFeed}
isLast={false}
{...post}
/>
<Fragment key={`${post.feedId}-${index}`}>
<FeedPost showHeader={showHeader} isMyFeed={isTotalFeed} isLast={false} {...post} />
{/* 10개마다 추천 섹션 반복 표시 */}
{(index + 1) % 10 === 0 && (
<RecommendedFeedSection sectionIndex={Math.floor((index + 1) / 10) - 1} />
)}
</>
</Fragment>
))}
</>
) : (
Expand Down
195 changes: 0 additions & 195 deletions src/components/group/CompletedGroupModal.tsx

This file was deleted.

16 changes: 12 additions & 4 deletions src/components/group/GroupCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ interface Props {
onClick?: () => void;
isFirstCard?: boolean;
isPublic?: boolean;
isCompleted?: boolean;
}

export const GroupCard = forwardRef<HTMLDivElement, Props>(
({ group, isOngoing, type = 'main', isRecommend = false, onClick, isFirstCard }, ref) => {
(
{ group, isOngoing, type = 'main', isRecommend = false, onClick, isFirstCard, isCompleted },
ref,
) => {
return (
<Card ref={ref} cardType={type} isFirstCard={isFirstCard} onClick={onClick}>
<CoverWrapper>
Expand All @@ -33,9 +37,13 @@ export const GroupCard = forwardRef<HTMLDivElement, Props>(
<Participant isRecommend={isRecommend}>
<img src={peopleIcon} alt="people" />
<p>{group.participants}</p>
<MaximumParticipants>/ {group.maximumParticipants}명</MaximumParticipants>
{!isCompleted && (
<MaximumParticipants>/ {group.maximumParticipants}명</MaximumParticipants>
)}
{isCompleted && <MaximumParticipants>명</MaximumParticipants>}
</Participant>
{(type !== 'modal' || group.type !== 'expired') &&
{!isCompleted &&
(type !== 'modal' || group.type !== 'expired') &&
(isOngoing === true ? (
<RecruitingDeadline isRecommend={isRecommend}>
{group.deadLine} 종료
Expand Down Expand Up @@ -138,7 +146,7 @@ const Bottom = styled.div`
const Participant = styled.div<{ isRecommend: boolean }>`
display: flex;
align-items: center;
gap: 6px;
gap: 4px;
color: ${colors.white};
font-size: ${typography.fontSize.xs};
font-weight: ${typography.fontWeight.medium};
Expand Down
Loading