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
2 changes: 1 addition & 1 deletion src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apiClient.interceptors.request.use(
} else {
console.log('❌ localStorage에 토큰이 없습니다.');
// config.headers.Authorization =
// 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjEsImlhdCI6MTc1NDM4MjY1MiwiZXhwIjoxNzU2OTc0NjUyfQ.BSGuoMWlrzc0oKgSJXHEycxdzzY9-e7gD4xh-wSDemc';
// 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjksImlhdCI6MTc1Njc4MjEyNywiZXhwIjoxNzU5Mzc0MTI3fQ.iRU7rN90Vs9Wykxvw-gkyAkbyB-HQENm_WifYHb2UR8eyJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjksImlhdCI6MTc1Njc4NTY5NSwiZXhwIjoxNzU5Mzc3Njk1fQ.jnYVdrvtHivfyteXPHAZmAM1mkwW2U66EPn7BylzHu0';
}

return config;
Expand Down
31 changes: 24 additions & 7 deletions src/components/members/MemberList.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,8 @@ export const MemberItem = styled.div`
justify-content: space-between;
padding: 20px;
cursor: pointer;
transition: background-color 0.2s;
position: relative;

&:hover {
background-color: ${colors.darkgrey['50']};
}

&:focus-visible {
outline: 2px solid ${semanticColors.text.point.green};
outline-offset: -2px;
Expand Down Expand Up @@ -67,8 +62,30 @@ export const MemberName = styled.div`
font-weight: ${typography.fontWeight.medium};
`;

export const MemberRole = styled.div`
color: ${semanticColors.text.point.green};
export const MemberRole = styled.div<{ roleType?: string }>`
color: ${({ roleType }) => {
if (!roleType) return semanticColors.text.point.green;

const role = roleType.toLowerCase();

if (role.includes('예술') || role.includes('art')) {
return semanticColors.text.character.pink;
}
if (role.includes('문학') || role.includes('literature')) {
return semanticColors.text.character.mint;
}
if (role.includes('사회') || role.includes('sociology')) {
return semanticColors.text.character.orange;
}
if (role.includes('인문') || role.includes('humanities')) {
return semanticColors.text.character.skyblue;
}
if (role.includes('과학') || role.includes('science')) {
return semanticColors.text.character.lavender;
}

return semanticColors.text.point.green;
}};
font-size: ${typography.fontSize.xs};
font-weight: ${typography.fontWeight.regular};
`;
Expand Down
2 changes: 1 addition & 1 deletion src/components/members/MemberList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const MemberList = ({ members, onMemberClick }: MemberListProps) => {
)}
<MemberInfo>
<MemberName>{member.nickname}</MemberName>
<MemberRole>{member.role}</MemberRole>
<MemberRole roleType={member.role}>{member.role}</MemberRole>
</MemberInfo>
</ProfileSection>
<MemberStatus>
Expand Down
3 changes: 2 additions & 1 deletion src/components/memory/RecordItem/RecordItem.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ export const UserAvatar = styled.div<{ src?: string }>`
height: 36px;
border-radius: 50%;
background-color: ${colors.grey[400]};
background-image: ${({ src }) => src ? `url(${src})` : 'none'};
background-image: ${({ src }) => (src ? `url(${src})` : 'none')};
background-size: cover;
background-position: center;
margin-right: 8px;
border: 0.5px solid ${colors.grey[300]};
`;

export const UserInfo = styled.div`
Expand Down
2 changes: 1 addition & 1 deletion src/pages/feed/Feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const Feed = () => {
if (!authToken) {
// localStorage.setItem(
// 'authToken',
// 'eyJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjEsImlhdCI6MTc1NDM4MjY1MiwiZXhwIjoxNzU2OTc0NjUyfQ.BSGuoMWlrzc0oKgSJXHEycxdzzY9-e7gD4xh-wSDemc',
// 'eyJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjksImlhdCI6MTc1Njc4MjEyNywiZXhwIjoxNzU5Mzc0MTI3fQ.iRU7rN90Vs9Wykxvw-gkyAkbyB-HQENm_WifYHb2UR8',
// );
console.log('🔑 하드코딩된 토큰으로 설정했습니다.');
return;
Expand Down
4 changes: 0 additions & 4 deletions src/pages/groupDetail/ParticipatedGroupDetail.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ export const ClickableMeta = styled.div`
flex-direction: column;
width: 100%;
cursor: pointer;

&:hover {
opacity: 0.8;
}
`;

export const MetaChevron = styled.img`
Expand Down
7 changes: 3 additions & 4 deletions src/pages/memory/Memory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ const Memory = () => {
// 기록 데이터
const [myRecords, setMyRecords] = useState<Record[]>([]);
const [groupRecords, setGroupRecords] = useState<Record[]>([]);

// API에서 받은 페이지 정보
const [totalPages, setTotalPages] = useState<number>(0);
const [currentUserPage, setCurrentUserPage] = useState<number>(0);
Expand Down Expand Up @@ -117,7 +116,7 @@ const Memory = () => {
}

setIsOverviewEnabled(response.data.isOverviewEnabled);

// 페이지 정보 설정 (API에서 제공되면)
if (response.data.totalPages !== undefined) {
setTotalPages(response.data.totalPages);
Expand Down Expand Up @@ -242,7 +241,7 @@ const Memory = () => {

// 독서 진행률 계산 (전체 페이지 대비 현재 페이지 퍼센트)
const readingProgress = totalPages > 0 ? Math.round((currentUserPage / totalPages) * 100) : 0;

// 총평 활성화 상태를 읽기 진행률에 따라 표시용으로 활용
const overviewStatus = isOverviewEnabled ? '총평 활성화' : '총평 비활성화';
console.log('📊 현재 상태:', overviewStatus, `진행률: ${readingProgress}%`);
Expand Down Expand Up @@ -300,7 +299,7 @@ const Memory = () => {
onClose={() => setShowSnackbar(false)}
/>
)}

<GlobalCommentBottomSheet />
</Container>
);
Expand Down