Skip to content

Commit

Permalink
Merge branch 'dev' into #741-fix-2024-봄학기-새터반-택시-대제전-credit-순서-변경
Browse files Browse the repository at this point in the history
  • Loading branch information
kmc7468 authored Feb 22, 2024
2 parents addd06b + 2f6fbcf commit c2f6301
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 94 deletions.
1 change: 1 addition & 0 deletions packages/web/src/atoms/event2024SpringInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { atom } from "recoil";

export type Event2024SpringInfoType = Nullable<{
isAgreeOnTermsOfEvent: boolean;
isEligible: boolean;
completedQuests: QuestId[];
creditAmount: number;
groupCreditAmount: number;
Expand Down
182 changes: 88 additions & 94 deletions packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Link } from "react-router-dom";

import { useValueRecoilState } from "@/hooks/useFetchRecoilState";

import AdaptiveDiv from "@/components/AdaptiveDiv";
import CreditAmountContainer from "@/components/Event/CreditAmoutContainer";
import EventButton from "@/components/Event/EventButton";
Expand All @@ -18,105 +20,97 @@ const EventSection2024Spring = () => {
background: eventTheme.black,
};

const { isEligible } = useValueRecoilState("event2024SpringInfo") || {};

return (
<div css={styleContainer}>
<AdaptiveDiv type="center">
<div
css={{
display: "flex",
alignItems: "center",
padding: "30px 0 25px",
gap: "8px",
}}
>
<svg width={0} height={0}>
<linearGradient id="linearColors" x1={1} y1={0} x2={1} y2={1}>
<stop offset={0} stopColor={eventTheme.blue_icon_top} />
<stop offset={1} stopColor={eventTheme.blue_icon_bottom} />
</linearGradient>
</svg>
<EmojiEventsRounded
sx={{ fill: "url(#linearColors)" }}
css={{
width: "24px",
height: "24px",
}}
/>
<div
css={{
...eventTheme.font20,
background: eventTheme.blue_title,
backgroundClip: "text",
textFillColor: "transparent",
}}
>
새터반 택시대제전
</div>
<div
css={{
...eventTheme.font16,
color: eventTheme.white,
}}
>
D-001
</div>
</div>
<div
css={{
display: "flex",
flexDirection: "column",
gap: "15px",
paddingBottom: "15px",
}}
>
{/* <div
css={{
...eventTheme.font16,
display: "flex",
padding: "14px 16px",
justifyContent: "space-between",
alignItems: "center",
borderRadius: "12px",
border: "1px solid #FFF",
color: eventTheme.white,
}}
>
새터 00반 넙죽코인 */}
<CreditAmountContainer />
{/* </div> */}
<div css={{ display: "flex", gap: "15px" }}>
<Link
to="/event/2024spring"
css={{ width: 0, flexGrow: 1, textDecoration: "none" }}
<>
{isEligible ? (
<div css={styleContainer}>
<AdaptiveDiv type="center">
<div
css={{
display: "flex",
alignItems: "center",
padding: "30px 0 25px",
gap: "8px",
}}
>
<EventButton
title="이벤트 안내"
css={{ background: eventTheme.blue_button }}
<svg width={0} height={0}>
<linearGradient id="linearColors" x1={1} y1={0} x2={1} y2={1}>
<stop offset={0} stopColor={eventTheme.blue_icon_top} />
<stop offset={1} stopColor={eventTheme.blue_icon_bottom} />
</linearGradient>
</svg>
<EmojiEventsRounded
sx={{ fill: "url(#linearColors)" }}
css={{
width: "24px",
height: "24px",
}}
/>
</Link>
<Link
to="/event/2024spring-missions"
css={{ width: 0, flexGrow: 1, textDecoration: "none" }}
<div
css={{
...eventTheme.font20,
background: eventTheme.blue_title,
backgroundClip: "text",
textFillColor: "transparent",
}}
>
새터반 택시대제전
</div>
<div
css={{
...eventTheme.font16,
color: eventTheme.white,
}}
>
D-001
</div>
</div>
<div
css={{
display: "flex",
flexDirection: "column",
gap: "15px",
paddingBottom: "15px",
}}
>
<EventButton
title="퀘스트"
css={{ background: eventTheme.purple_button }}
/>
</Link>
<Link
to="/event/2024spring-leaderboard"
css={{ width: 0, flexGrow: 1, textDecoration: "none" }}
>
<EventButton
title="새터반 순위"
css={{ background: eventTheme.orange_button }}
/>
</Link>
</div>
<CreditAmountContainer />
<div css={{ display: "flex", gap: "15px" }}>
<Link
to="/event/2024spring"
css={{ width: 0, flexGrow: 1, textDecoration: "none" }}
>
<EventButton
title="이벤트 안내"
css={{ background: eventTheme.blue_button }}
/>
</Link>
<Link
to="/event/2024spring-missions"
css={{ width: 0, flexGrow: 1, textDecoration: "none" }}
>
<EventButton
title="퀘스트"
css={{ background: eventTheme.purple_button }}
/>
</Link>
<Link
to="/event/2024spring-leaderboard"
css={{ width: 0, flexGrow: 1, textDecoration: "none" }}
>
<EventButton
title="새터반 순위"
css={{ background: eventTheme.orange_button }}
/>
</Link>
</div>
</div>
</AdaptiveDiv>
<WhiteContainerSuggestJoinEvent />
</div>
</AdaptiveDiv>
<WhiteContainerSuggestJoinEvent />
</div>
) : null}
</>
);
};

Expand Down

0 comments on commit c2f6301

Please sign in to comment.