Skip to content

Commit

Permalink
πŸ› 마감일 버그 μˆ˜μ • (#113)
Browse files Browse the repository at this point in the history
### πŸ“ μž‘μ—… λ‚΄μš©

- isActive λŒ€μ‹  마감일과 ν˜„μž¬ μ‹œκ°μ„ λΉ„κ΅ν•©λ‹ˆλ‹€. (더미 데이터 이슈)
  • Loading branch information
Yeonu-Kim authored Jan 11, 2025
1 parent 84c8443 commit 1efdfeb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 1 addition & 4 deletions src/pages/LandingPage/PostCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@ export const PostCard = ({ post, onDetailClick }: PostCardProps) => {
roles,
imageLink,
investAmount,
isActive,
employeeEndDate,
} = post;

console.log(post);

const validDate = employeeEndDate.slice(0, 23);

return (
Expand Down Expand Up @@ -144,7 +141,7 @@ export const PostCard = ({ post, onDetailClick }: PostCardProps) => {
<p
style={{
fontSize: '14px',
color: isActive ? 'green' : 'red',
color: new Date(validDate) > new Date() ? 'green' : 'red',
marginBottom: '12px',
}}
>
Expand Down
6 changes: 4 additions & 2 deletions src/pages/LandingPage/PostPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ export const PostPage = () => {
roles,
tags,
investAmount,
employmentEndDate,
employeeEndDate,
isActive,
IRDeckLink,
landingPageLink,
} = postDetailData.data;

const validDate = employeeEndDate.slice(0, 23);

return (
<div
className="post-detail"
Expand Down Expand Up @@ -150,7 +152,7 @@ export const PostPage = () => {

<p style={{ marginBottom: '8px' }}>
<strong>μ±„μš© 마감일:</strong>{' '}
{new Date(employmentEndDate).toLocaleDateString()}
{new Date(validDate).toLocaleDateString()}
</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/shared/api/entities/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type PostDTO = {
landingPageLink?: string;
externalDescriptionLink?: string[];
isActive: boolean;
employmentEndDate: Date;
employeeEndDate: string;
};

export type PostBriefDTO = {
Expand Down

0 comments on commit 1efdfeb

Please sign in to comment.