-
Notifications
You must be signed in to change notification settings - Fork 0
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
#340 feat: 일정 상세 UI 수정 #344
base: develop
Are you sure you want to change the base?
The head ref may contain hidden characters: "feat#340/\uC77C\uC815-\uC0C1\uC138-ui-\uC218\uC815"
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다!
모달,, 최고,,,
@@ -86,11 +104,11 @@ const EventEditor = () => { | |||
|
|||
if ( | |||
checkEmpty(data.title, '제목을 입력해 주세요.') || | |||
checkEmpty(data.cardinal, '기수를 입력해 주세요.') || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const fieldsToCheck = [
{ key: 'title', message: '제목을 입력해 주세요.' },
{ key: 'cardinal', message: '기수를 입력해 주세요.' },
{ key: 'start', message: '시작 시간을 입력해 주세요.' },
{ key: 'end', message: '종료 시간을 입력해 주세요.' },
{ key: 'location', message: '장소를 입력해 주세요.' },
{ key: 'requiredItem', message: '준비물을 입력해 주세요.' },
{ key: 'content', message: '내용을 입력해 주세요.' }
];
for (const { key, message } of fieldsToCheck) {
if (checkEmpty(data[key], message)) {
return;
}
}
이 부분은 해당 data를 객체로 구성해서 반복문으로 구현해도 좋을 거 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
조언 감사합니다~! 이 부분은 추후 공통 alert 디자인을 추가하면서 수정하려던 부분이라 그 때 이런 방법으로 수정해볼게요!
src/components/Event/EventTitle.tsx
Outdated
import * as S from '@/styles/calendar/EventDetailTitle.styled'; | ||
import { adminModalStyles } from '@/styles/calendar/EventDetailTitle.styled'; | ||
import { useState } from 'react'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import useGetUserInfo from '@/api/useGetUserInfo'; | ||
import Tag from './Tag'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
경로 🥹
const [adminModalIsOpen, setAdminModalIsOpen] = useState(false); | ||
const navi = useNavigate(); | ||
const formattedDateTime = formatDateTime(data.createdAt); | ||
|
||
const cardinal = [3, 4]; // 임시 데이터 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기는 나중에 api에서 받아오는 기수로 수정 되는 건가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넹 맞습니다~~ 상세조회 데이터에서 가져와야하는데 아직 값이 추가되어있지 않아서 임의로 설정해두었습니당
src/components/common/Modal.tsx
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
유용하게 쓰겠습니다 👏
1. 무슨 이유로 코드를 변경했나요?
#340 을 구현했습니다
2. 어떤 위험이나 장애를 발견했나요?
수정사항이 많아서 전부 반영했다가는 PR이 말도 안되게 커질 것 같아 일단 완성한 부분 먼저 올립니다,,
추후 수정 PR을 새로 올리도록 하겠습니다
3. 관련 스크린샷을 첨부해주세요.
2025-01-30.3.30.42.mov
4. 완료 사항
전반적인 일정 상세 페이지 관련 UI 수정을 완료했습니다
다만, 아직 디자인이 확정된 것이 아니라 조금씩 수정되고, 추가될 수 있습니다
기수 드롭다운의 경우 api 연결이 추가로 필요합니다. 현재는 프론트 코드 내에서 입력해둔 상태입니다
common 파일 내에 공통 모달 컴포넌트를 구현해두었습니다.
![스크린샷 2025-01-30 오전 3 36 32](https://private-user-images.githubusercontent.com/92977621/407861551-bb728b94-9123-42f1-b536-3c59a6f3c249.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMDgzNTksIm5iZiI6MTczOTAwODA1OSwicGF0aCI6Ii85Mjk3NzYyMS80MDc4NjE1NTEtYmI3MjhiOTQtOTEyMy00MmYxLWI1MzYtM2M1OWE2ZjNjMjQ5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDA5NDczOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYzYTIwZWQ2MGE3N2I1YjY1NWUwY2NiYmRmNDI2MWI0ODg0MGZmZmY1N2E1NmIzZTExZWVkYzg0YWNhZTRjM2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.vpyqjue9E3VCQzNpcHnXStwt-9NJjDmOzTLNjtO_GfQ)
정말 기본적인 css만 구현이 되어있고, children props를 전달하여 내용은 자유롭게 커스텀 가능합니다
따라서 삭제 모달 만들 때도 해당 컴포넌트 사용하여 삭제 모달 만드시면 될 것 같습니다!
5. 추가 사항