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: 5 additions & 5 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ NEXT_PUBLIC_ORIGIN=http://localhost:3000
NEXT_PUBLIC_FACEBOOK_APP_ID=
NEXT_PUBLIC_GOOGLE_OAUTH_CLIENT_ID=456944189609-jo13a6v8cb25vofi8qfldu3ionkq4u2q.apps.googleusercontent.com
NEXT_PUBLIC_APPLE_OAUTH_APP_ID=com.sopt-playground.sopt-iOS
NEXT_PUBLIC_API_URL=https://playground.dev.sopt.org
NEXT_PUBLIC_API_URL=https://playground-dev.sopt.org
NEXT_PUBLIC_DEBUG=true
NEXT_PUBLIC_GTM_ID=GTM-KJHR376
NEXT_PUBLIC_AMPLITUDE_API_KEY=
NEXT_PUBLIC_KAKAO_TALK_PLUGIN_KEY=
NEXT_PUBLIC_ADMIN_API_URL=https://api-dev.sopt.org/v2
NEXT_PUBLIC_ADMIN_API_URL=https://api-dev-api.sopt.org/v2
NEXT_PUBLIC_ADMIN_API_KEY=
NEXT_PUBLIC_OPERATION_API_URL=https://operation.api.dev.sopt.org
NEXT_PUBLIC_AUTH_API_URL=https://auth.api.dev.sopt.org
NEXT_PUBLIC_CREW_API_URL=https://crew.api.dev.sopt.org
NEXT_PUBLIC_OPERATION_API_URL=https://operation-api-dev.sopt.org
NEXT_PUBLIC_AUTH_API_URL=https://auth-api-dev.sopt.org
NEXT_PUBLIC_CREW_API_URL=https://crew-dev.sopt.org
4 changes: 3 additions & 1 deletion src/components/feed/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ interface Post {
activity: {
generation: number;
part: string;
team: string | null;
};
careers: {
companyName: string;
Expand Down Expand Up @@ -53,9 +54,10 @@ const 특수임원List = [

export function getMemberInfo(post: Post) {
const is특수임원 = 특수임원List.some((keyword) => post.member.activity.part.includes(keyword));
const isMakers = post.member.activity.team === '메이커스';

const defaultInfo = `${post.member.activity.generation}기 ${
is특수임원 ? post.member.activity.part : `${post.member.activity.part}파트`
is특수임원 ? post.member.activity.part : isMakers ? '메이커스' :`${post.member.activity.part}파트`
}`;

if (post.categoryId == null) {
Expand Down
10 changes: 9 additions & 1 deletion src/components/feed/home/SopticleArea/SopticleCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { RecentSopticleType } from '@/api/endpoint/feed/getRecentSopticle';
import Text from '@/components/common/Text';
import { SOPTICLE_CATEGORY_ID } from '@/components/feed/constants';
import FeedUrlCard from '@/components/feed/list/FeedUrlCard';
import { getMemberInfo } from '@/components/feed/common/utils';

interface SopticleCardProps {
sopticle: RecentSopticleType;
Expand All @@ -23,7 +24,14 @@ const SopticleCard = ({ sopticle }: SopticleCardProps) => {
<UserNameStyle>{member.name}</UserNameStyle>
<DotStyle>•</DotStyle>
<SubTextStyle>
{member.activity.generation}기 {member.activity.part}파트
{getMemberInfo({
categoryId: 21,
categoryName: '솝티클',
member: {
activity: member?.activity ?? { generation: 0, part: '', team: null },
careers: member?.careers ?? null,
},
})}
</SubTextStyle>
<DotStyle>•</DotStyle>
<SubTextStyle>{createdAt}</SubTextStyle>
Expand Down
2 changes: 1 addition & 1 deletion src/components/feed/list/FeedListItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const FeedListItems: FC<FeedListItemsProps> = ({ categoryId, renderFeedDetailLin
categoryId: post.categoryId,
categoryName: post.categoryName,
member: {
activity: post.member?.activity ?? { generation: 0, part: '' },
activity: post.member?.activity ?? { generation: 0, part: '', team: null },
careers: post.member?.careers ?? null,
},
})}
Expand Down
Loading