Skip to content

Conversation

@seongminn
Copy link
Member

🌍 이슈 번호

✅ 작업 내용

  • proxy 환경을 구축합니다.
  • round, sports list 등을 상수로 관리합니다.
    • 추후 api 통신으로 해당 데이터를 관리할 수도 있습니다.
    • 하지만 현재는 단위가 크지 않고, 빠른 개발을 위해 이렇게 해두었습니다.
  • 리그 정보 관리 페이지를 생성합니다.
    • 현재 종목, 라운드 데이터가 적절하게 form에 들어가고 있지 않습니다.
    • 이 부분 나중에 수정해서 올리겠습니다!

📝 참고 자료

♾️ 기타

@seongminn seongminn added the feature New features label Mar 14, 2024
@seongminn seongminn self-assigned this Mar 14, 2024
@netlify
Copy link

netlify bot commented Mar 14, 2024

Deploy Preview for hufscheer ready!

Name Link
🔨 Latest commit 64a4d3c
🔍 Latest deploy log https://app.netlify.com/sites/hufscheer/deploys/65f453583d9e0e00092ba989
😎 Deploy Preview https://deploy-preview-93--hufscheer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 96
Accessibility: 100
Best Practices: 92
SEO: 91
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Mar 14, 2024

Deploy Preview for hufscheer-manager ready!

Name Link
🔨 Latest commit 64a4d3c
🔍 Latest deploy log https://app.netlify.com/sites/hufscheer-manager/deploys/65f4535882531a000858a818
😎 Deploy Preview https://deploy-preview-93--hufscheer-manager.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@ohprettyhak ohprettyhak left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!


export const putLeague = async (data: PutLeaguePayload) => {
export const updateLeague = async (data: UpdateLeaguePayload) => {
await instance.put('/league/', data);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
await instance.put('/league/', data);
await instance.put('/leagues/', data);

API 문서와 실제 호출 링크가 달라 404 오류가 발생하네요.

/>
</Flex>

<Flex direction="column" mt="md" gap={rem(4)}>
Copy link
Contributor

Choose a reason for hiding this comment

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

혹시 리그 정보 페이지에서는 종목 추가가 불가능할까요? 현재는 만들어진 종목의 수정만 가능한 거 같습니다!

Copy link
Member Author

Choose a reason for hiding this comment

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

아직 개발 중이라 올리지 않았는데, 추가할 수 있도록 수정하고 있습니다!

{ value: '2', label: '농구' },
{ value: '3', label: '야구' },
]}
data={GAMES.SPORTS}
Copy link
Contributor

Choose a reason for hiding this comment

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

상수로 적립하여 사용하는 부분은 좋은 거 같습니다! 이쪽은 오히려 API 호출이 없는 것이 더 낫겠네요.

@@ -0,0 +1,9 @@
import useLeagueQuery from './useLeagueQuery';

export default function useLeagueDetailQuery(leagueId: number) {
Copy link
Contributor

Choose a reason for hiding this comment

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

이 쿼리는 /report 페이지에서도 사용하겠습니다 ㅎㅎ

leagueId: league.leagueId,
}),
);
}, [buttonRef, edit, form, league.leagueId, mutateUpdateLeague]);
Copy link
Contributor

Choose a reason for hiding this comment

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

image

'편집' 버튼을 클릭했을 때도 API 호출이 발생하는데, 확인 부탁드립니다.
편집/완료 버튼을 누를때마다 API가 호출되고 있어요.

Copy link
Member Author

Choose a reason for hiding this comment

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

이건 로컬에서 동작하는 것과 다르게 동작하고 있네요🤔 한 번 원인을 찾아보겠습니다!

Copy link
Member Author

Choose a reason for hiding this comment

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

이제 정상적으로 동작합니다!

Copy link
Contributor

@ohprettyhak ohprettyhak left a comment

Choose a reason for hiding this comment

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

고생하셨습니다. 마지막으로 데이터 저장 후 동기화 관련해서 코멘트 남깁니다!

return (
<Layout navigationTitle={'대회 정보 관리'} navigationMenu={<RightButton />}>
<LeagueDetailForm
league={league}
Copy link
Contributor

@ohprettyhak ohprettyhak Mar 15, 2024

Choose a reason for hiding this comment

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

league를 직접 넘겨주다보니 편집 후에도 메인에는 동기화되지 않는 문제가 발생하네요.

리그 관리 페이지 → 대회 정보 관리 → 오른쪽 편집 버튼 클릭 후 날짜 수정 → 뒤로가기를 통해 리그 관리 페이지 → 대회 정보 관리

순으로 진행해보시면 실제 서버에서 가지고 있는 값은 바뀌었지만, 리그 관리 페이지에서 전달하는 league 값이 바뀌지 않아 이전 데이터를 불러오는 것을 확인할 수 있습니다.

Copy link
Member Author

Choose a reason for hiding this comment

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

확인했고 수정해서 올렸습니다! 감사합니다ㅎㅎ 👍👍

Copy link
Contributor

Choose a reason for hiding this comment

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

머지해도 좋을 거 같습니다! 고생하셨습니다 👍

@seongminn seongminn merged commit 5a28743 into main Mar 15, 2024
@seongminn seongminn deleted the feat/manage-league-info branch March 15, 2024 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 리그 정보 관리 페이지 생성

3 participants