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

[feat]: 주문내역 등록 날짜 추가(#346) #347

Merged
merged 5 commits into from
Jun 10, 2024
Merged

[feat]: 주문내역 등록 날짜 추가(#346) #347

merged 5 commits into from
Jun 10, 2024

Conversation

devkyoung2
Copy link
Member

#️⃣연관된 이슈

close: #346

📝작업 내용

  • 주문내역 날짜 추가
    image

🙏리뷰 요구사항(선택)

@devkyoung2 devkyoung2 self-assigned this Jun 5, 2024
Copy link

vercel bot commented Jun 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kakao-funding ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 10, 2024 9:34am

Comment on lines 8 to 12
.num_data {
@include font(15px, 700);

margin-left: 5px;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

이게 실질적인 날짜값인 것 같은데 혹시 datedata로 잘못 쓰신 건가요??

Copy link
Member Author

Choose a reason for hiding this comment

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

헉 그러네요... 수정했습니다 .0c6e946

export const formatDateAndTime = (dateTime: string) => {
const [date, time] = dateTime.split('T');

const formattedDate = date.split('-').join('.');
Copy link
Contributor

Choose a reason for hiding this comment

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

replaceAll()로 대체 가능할 것 같습니당

Copy link
Member Author

Choose a reason for hiding this comment

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

반영했습니다! f563044

const [date, time] = dateTime.split('T');

const formattedDate = date.split('-').join('.');
const formattedTime = time.slice(0, 8);
Copy link
Contributor

Choose a reason for hiding this comment

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

작성하신 주석에 따르면 time은 hh:mm:ss인데 슬라이스하는 이유가 뭔가요?
다른 문자가 딸려 올까봐 하는 건가요?

Copy link
Member Author

@devkyoung2 devkyoung2 Jun 10, 2024

Choose a reason for hiding this comment

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

넵 주문내역 api 응답값으로 알수없는 숫자값이 딸려오더라구요 그래서 포매팅 해줬습니다.
image

- replaceAll 메서드를 사용하여 직관적으로 포매팅 함
@devkyoung2 devkyoung2 merged commit 3fb6ee7 into dev Jun 10, 2024
3 checks passed
@devkyoung2 devkyoung2 deleted the feat/346 branch June 10, 2024 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

마이 페이지 - 주문내역 주문날짜 추가
3 participants