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

안내면진다 디테일 페이지 구현 #704

Merged
merged 39 commits into from
Oct 23, 2024
Merged

Conversation

ss0526100
Copy link
Contributor

PR의 목적이 무엇인가요?

안내면 진다 디테일 페이지를 구현했습니다.

이슈 ID는 무엇인가요?

설명

image
상세페이지

image
결과페이지

bet 리스트에서 상세페이지로 넘어갔을 때
이미 발표가 진행됨->결과페이지로 넘어감
발표가 진행안됨->상세페이지로 넘어감->결과발표->결과페이지로 넘어감

이렇게됩니다

질문 혹은 공유 사항 (Optional)

close #675

@ss0526100 ss0526100 requested review from cys4585 and jaeml06 October 23, 2024 01:38
@ss0526100 ss0526100 added FE 프론트엔드 관련 이슈입니다. 🌱 기능추가 feature (새로운 기능 구현) labels Oct 23, 2024
Copy link
Contributor

@cys4585 cys4585 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 👍

],
queryFn: () => getBet(betId),
staleTime: 1000,
refetchInterval: 1000,
Copy link
Contributor

Choose a reason for hiding this comment

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

반복 페칭할 때 staleTime 적용 해줘야 하나요?? 왜 해줘야 하나요??

Copy link
Contributor 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.

결과 페이지가 아직 살아있군요. 상세에서 바로 채팅방으로 간다고 생각했는데, 아닌가보군요 ..;ㅎ

// 더미 데이터 생성
const dummyBets = [
{
id: 1,
id: BET_ID,
Copy link
Contributor

Choose a reason for hiding this comment

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

동일한 id를 넣어준 이유가 있을까요?? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

그냥 어디를 눌러도 다 똑같은 상세페이지로 가게 하려구요

다른 id를 주려면 다른 상세bet정보를 만들어줘야해요

Copy link
Contributor

Choose a reason for hiding this comment

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

굿

@@ -26,7 +26,7 @@ export default function BetCreationPage() {
});

const { mutate: createBet } = useAddBet((betId) => {
navigate(GET_ROUTES.nowDarakbang.betDetail(betId));
navigate(GET_ROUTES.nowDarakbang.betDetail(betId), { replace: true });
Copy link
Contributor

Choose a reason for hiding this comment

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

replace를 해준 이유가 있나요?? 생성 후 뒤로가기 케이스에서 문제..가 있지 않을까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

이건 무지성으로 했어요..

다른 페이지에서 replace 안하면 이상해지더라구요..

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
Contributor

Choose a reason for hiding this comment

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

대단합니다 👍👍👍👍👍👍👍👍👍👍👍
근데 얘도 컴포넌트인가요??? 파일이름이랑 폴더명만 수정하면 좋을 것 같아요�

Copy link
Contributor Author

Choose a reason for hiding this comment

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

얘는 그려주는 js 함수인데요 컴포넌트가 아니라 함수라서 drawRoullete이라고 했어요

Comment on lines +37 to +50
// useEffect(() => {
// const nowRoot = document.getElementById('root');
// if (nowRoot) {
// nowRoot.style.backgroundColor = theme.colorPalette.orange[200];
// nowRoot.style.transition = '1s all ease-in-out';
// }

// return () => {
// if (nowRoot) {
// nowRoot.style.backgroundColor = '';
// nowRoot.style.transition = '';
// }
// };
// }, [theme]);
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
Contributor Author

Choose a reason for hiding this comment

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

이거 추후에 살리고 싶어서..헤헤헤헤헤헤헤헤ㅔ

@ss0526100 ss0526100 merged commit 56fc3d1 into develop-frontend Oct 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FE 프론트엔드 관련 이슈입니다. 🌱 기능추가 feature (새로운 기능 구현)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants