Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C-MAIN][J-TB] 메인페이지, 모집글 디테일 변경 (현재 명수 삭제, 카드 디자인) #1138

Merged
merged 4 commits into from
Jul 30, 2024
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
4 changes: 2 additions & 2 deletions src/app/job/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const JobInfo = () => {

return (
<Container sx={containerStyle}>
<Stack mt={'1rem'} mb={'0.5rem'} spacing={4}>
<Typography variant={'Title1'} color={'text.strong'}>
<Stack mb={'0.5rem'} spacing={4}>
<Typography color={'text.strong'} variant={'Title1'}>
채용 공고
</Typography>
</Stack>
Expand Down
11 changes: 5 additions & 6 deletions src/app/panel/main-page/MainCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import { ChipStyle } from '@/app/panel/main-page/MainCard.style'
import CuPhotoBox from '@/components/CuPhotoBox'
import dynamic from 'next/dynamic'
import dayjs from 'dayjs'
import { TypeChip } from '@/app/recruit/[id]/panel/RecruitInfoElement'
import React from 'react'

const DynamicOtherProfile = dynamic(() => import('@/app/panel/OthersProfile'), {
loading: () => <></>,
Expand Down Expand Up @@ -181,13 +183,10 @@ const MainCard = ({
>
{title}
</Typography>

<Stack justifyContent={'space-between'} direction={'row'} mt={0.5}>
<Typography variant="Body2" color="text.alternative">
{dayjs(createdAt).format('YYYY-MM-DD')}
</Typography>
<Stack direction={'row'} mt={0.5} alignItems={'center'} gap={1}>
<TypeChip type={type} />
<Typography variant="Body2" color="text.alternative">
{member}명
{dayjs(createdAt).format('YYYY-MM-DD')} · {member}명
</Typography>
</Stack>

Expand Down
3 changes: 1 addition & 2 deletions src/app/panel/main-page/MainMobileView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const MainMobileView = ({ initData }: { initData: IPagination<IPost[]> }) => {

return (
<Container sx={{ ...containerStyle, paddingBottom: '2rem' }}>
{queryKeyword === '' ? (
{queryKeyword == '' ? (
<>
<Box width={'100%'}>
<MainBanner />
Expand Down Expand Up @@ -74,7 +74,6 @@ const MainMobileView = ({ initData }: { initData: IPagination<IPost[]> }) => {
<Box key={project.recruit_id}>
<MainCard
{...project}
type={type}
favorite={
isInit
? getFavoriteData(project.recruit_id)
Expand Down
1 change: 0 additions & 1 deletion src/app/panel/main-page/MainPcView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ const MainPcView = ({ initData }: { initData: IPagination<IPost[]> }) => {
<Grid item key={project.recruit_id} sm={12} md={6} lg={4}>
<MainCard
{...project}
type={type}
Copy link
Contributor

Choose a reason for hiding this comment

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

MainCard 내에서 모집글 링크 만들 때 type을 사용하는 것 같아서 type은 계속 props로 넘겨줘야 할 것 같아요~
(지금은 타입에러가 나고 있네용 ㅎㅎ)
Screen_Shot 2024-07-20 14 33 30

favorite={
isInit
? getFavoriteData(project.recruit_id)
Expand Down
6 changes: 3 additions & 3 deletions src/app/recruit/[id]/panel/RecruitDetailContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ const RecruitDetailContent = ({
<Typography
variant={'Body2'}
color={'text.alternative'}
>{`${data?.current}/${data?.totalNumber} 명`}</Typography>
>{`${data?.totalNumber} 명`}</Typography>
) : (
roleList?.map(({ name, number, current }, idx: number) => (
roleList?.map(({ name, number }, idx: number) => (
<Typography
variant={'Body2'}
color={'text.alternative'}
key={idx}
>{`${name} ${current}/${number} 명`}</Typography>
>{`${name} ${number} 명`}</Typography>
))
)}
</Stack>
Expand Down
2 changes: 1 addition & 1 deletion src/app/recruit/[id]/panel/RecruitInfoElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const TypeChip = ({ type }: { type: ProjectType }) => {
return (
<Chip
label={type === 'STUDY' ? '스터디' : '프로젝트'}
size="medium"
size={'small'}
sx={{
backgroundColor: 'background.tertiary',
borderRadius: 2,
Expand Down
1 change: 1 addition & 0 deletions src/types/IPostDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export interface IPost {
status: string
tagList: ITag[]
favorite: boolean | undefined
type: ProjectType
}

export interface IPostDetail {
Expand Down