-
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
[refactor, chore] 인터랙션 페이지 유저플로우에 맞게 수정 #94
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
src/mainPage/features/interactions/description/InteractionSlide.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { useEffect, useState } from "react"; | ||
import { useState } from "react"; | ||
|
||
import scrollTo from "@main/scroll/scrollTo.js"; | ||
import { COMMENT_SECTION } from "@main/scroll/constants.js"; | ||
|
@@ -23,7 +23,8 @@ export default function InteractionAnswer({ | |
const currentServerTime = useEventStore((state) => state.currentServerTime); | ||
const eventDate = EVENT_START_DATE.getTime() + index * 24 * 60 * 60 * 1000; | ||
const [isAniPlaying, setIsAniPlaying] = useState(false); | ||
const [isJoined, setIsJoined] = useState(false); | ||
const isEventToday = | ||
getEventDateState(currentServerTime, eventDate) === "active"; | ||
const authModal = ( | ||
<AuthModal | ||
onComplete={() => { | ||
|
@@ -33,7 +34,6 @@ export default function InteractionAnswer({ | |
}) | ||
.then((res) => { | ||
console.log(res); | ||
setIsJoined(true); | ||
}) | ||
.catch((e) => { | ||
console.log(e); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 여기 기능이 빠졌어요 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 향후 해당부분 기능 체크리스트에 저장해두었다가 나중에 추가해주시면 감사하겠습니다 |
||
|
@@ -42,12 +42,6 @@ export default function InteractionAnswer({ | |
/> | ||
); | ||
|
||
useEffect(() => { | ||
if (getEventDateState(currentServerTime, eventDate) === "active") { | ||
setIsJoined(true); | ||
} | ||
}, [currentServerTime, eventDate]); | ||
|
||
async function onClickWrite() { | ||
await close(); | ||
scrollTo(COMMENT_SECTION); | ||
|
@@ -107,19 +101,19 @@ export default function InteractionAnswer({ | |
</div> | ||
|
||
<div className="absolute bottom-10 flex flex-col items-center gap-10"> | ||
{isLogin ? ( | ||
{isLogin || !isEventToday ? ( | ||
<> | ||
<span className="text-body-m text-green-400 font-bold"> | ||
{isJoined | ||
{isEventToday | ||
? "오늘 응모가 완료되었습니다!" | ||
: "응모 기간이 지났습니다!"} | ||
</span> | ||
|
||
<div className="flex gap-4 items-end"> | ||
<div className="flex flex-col gap-2"> | ||
<div | ||
className={`${isJoined ? "" : "hidden"} relative flex flex-col items-center animate-bounce`} | ||
> | ||
<div | ||
className={`${isEventToday ? "flex" : "hidden"} flex-col gap-2}`} | ||
> | ||
<div className="flex relative flex-col items-center animate-bounce"> | ||
<span className=" bg-green-400 text-nowrap text-body-s xl:text-body-m text-neutral-800 rounded-full px-4 xl:px-8 py-1 xl:py-2 font-bold"> | ||
당첨확률 UP! | ||
</span> | ||
|
@@ -136,6 +130,7 @@ export default function InteractionAnswer({ | |
기대평 작성하기 | ||
</Button> | ||
</div> | ||
|
||
<Button | ||
onClick={onClickShare} | ||
styleType="ghost" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
24 * 60 * 60 * 1000은 매직 넘버이므로, 별도의 상수로 분리해 주세요.