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

#728 2024 봄 이벤트 퀘스트 페이지 만들기 #732

Merged
merged 15 commits into from
Feb 19, 2024

Conversation

pbc1017
Copy link
Contributor

@pbc1017 pbc1017 commented Feb 19, 2024

Summary

It closes #728

Images or Screenshots

@pbc1017 pbc1017 linked an issue Feb 19, 2024 that may be closed by this pull request
Copy link

netlify bot commented Feb 19, 2024

Deploy Preview for taxi-dev-preview ready!

Name Link
🔨 Latest commit f33c3f8
🔍 Latest deploy log https://app.netlify.com/sites/taxi-dev-preview/deploys/65d37a1f424ef0000834b80a
😎 Deploy Preview https://deploy-preview-732--taxi-dev-preview.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.

Comment on lines 7 to 12
completedQuests: QuestId[];
creditAmount: number;
groupCreditAmount: number;
group: number;
ticket1Amount: number;
ticket2Amount: number;
Copy link
Member

Choose a reason for hiding this comment

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

추후에 이벤트 참가 가능 여부가 event2024SpringInfo API 에 담겨져서 넘어 올 것 같습니다.
이 값에 따라 이벤트 상태, 이벤트 참여 권장 컴포넌트 띄어지도록 수정되어야 할 것 같아요

@@ -3,6 +3,7 @@ import theme from "@/tools/theme";
type ButtonAboveFooterProps = {
text: string;
onClick?: () => void;
isWhite?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

지워야 하는 필드인 것 같습니다 !

useEffect(() => {
const prevBackground = document.body.style.background;
document.body.style.background = color;
// return () => document.body.style.background = prevBackground;
Copy link
Member

Choose a reason for hiding this comment

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

주석되어 있어요 ㅜ

Comment on lines 6 to 8
export const useEventBackgroundEffect = ({
color = "#000000",
}: EventBackgroundEffectProps) => {
Copy link
Member

Choose a reason for hiding this comment

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

컴포넌트가 아니라서 props 명칭 사용이 부적절해보입니다 ㅜ

left: 0,
width: "8px",
background: isDone ? theme.purple_disabled : theme.purple,
backgroundColor: "#000",
Copy link
Member

Choose a reason for hiding this comment

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

useEventBackgroundColorEffect Hook의 사용으로 backgroundColor: "#000", 지우서도 될 것 같습니다 !

<div css={styleRewardText}>
{questCompletedCnt}회 달성 (최대 {quest.maxCount}회)
</div>
<div css={{ flexGrow: 1 }} />
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<div css={{ flexGrow: 1 }} />
<div css={{ flexGrow: 1, width: 0 }} />

</WhiteContainer>
);
};

const Event2024SpringMissions = () => {
const { quests } = useValueRecoilState("event2023FallInfo") || {};
const { quests } = useValueRecoilState("event2024SpringInfo") || {};
useEventBackgroundEffect({ color: "#000000" });
Copy link
Member

Choose a reason for hiding this comment

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

기본 값있어서 color 안넘겨주어도 될 것 같습니다 !

<>
<div
css={{
background: eventTheme.black,
Copy link
Member

Choose a reason for hiding this comment

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

이것두 useEventBackgroundEffect 있어서 <></> 사용으로 수정 가능해 보입니다.!

Copy link
Member

@14KGun 14KGun left a comment

Choose a reason for hiding this comment

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

수고하셨습니다 👍 👍

);
};

export default SuggestJoinEventContainer;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
export default SuggestJoinEventContainer;
export default memo(SuggestJoinEventContainer);

메모이제이션 권장 드립니다.!

@@ -0,0 +1,11 @@
import { useEffect } from "react";

export const useEventBackgroundEffect = (color: string = "#000000") => {
Copy link
Member

Choose a reason for hiding this comment

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

CSSProperties.background type 사용 가능합니다 !

@14KGun 14KGun marked this pull request as ready for review February 19, 2024 16:00
@pbc1017 pbc1017 merged commit d14ac50 into dev Feb 19, 2024
4 checks passed
@pbc1017 pbc1017 deleted the #728-2024-봄-이벤트-퀘스트-페이지-만들기 branch February 19, 2024 16:01
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.

2024 봄 이벤트 퀘스트 페이지 만들기
2 participants