-
Notifications
You must be signed in to change notification settings - Fork 3
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
[Feat] 이벤트페이지 #174
Merged
The head ref may contain hidden characters: "161-feat-\uC774\uBCA4\uD2B8\uD398\uC774\uC9C0"
Merged
[Feat] 이벤트페이지 #174
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
5464385
Feat: 이벤트 윗부분
Young2un 3585ab6
Feat: 이벤트 타이틀 컴포넌트 구현
Young2un 07b7962
Fix: hasShop 옵셔널로 변경
Young2un 3434630
Feat: 가입혜택 하는 중
Young2un 4c7434b
Feat: 이벤트 상단고정탭 제작중 (수정 예정)
Young2un 5f5dacf
Feat: 레이아웃 구성 중
Young2un 7ec731b
Merge: branch 'develop' of https://github.com/Quad8/quad8-front into …
Young2un b8c42d7
Style: alt 속성 추가
Young2un 4f9dbd0
Style: 오타 수정
Young2un a9f9a2f
Feat: 1차 휠 구현
Young2un da20a7a
Feat: 룰렛 로직까지 구현
Young2un 0b6cc42
Style: 페이지네이션 글씨 크기 수정
Young2un 3913bf6
Style: 카테고리 클릭범위 스타일 수정
Young2un 00b884f
Style: 오타있길래 수정했슴당
Young2un 75fb6a3
Style: 토큰 필요없는 부분이라 삭제
Young2un 12651ab
Feat: 이미지 추가
Young2un 5aead6f
Feat: 룰렛 1일 1회 로직 추가
Young2un ca7fa53
Chore: 컨페티 라이브러리 설치
Young2un ca49a68
Feat: 이벤트 프리패치, 기타적인거 수정
Young2un 735f7b8
Style: 오타수정
Young2un e3d8034
Style: 오타수정
Young2un f337081
Merge: branch 'develop' of https://github.com/Quad8/quad8-front into …
Young2un 2758e85
Docs: 이미지, 아이콘 추가
Young2un c506339
Feat: 배송비무료 부분 완성
Young2un 1c1c547
Refactor: 뮤테이션 커스텀 훅으로 빼고 기타 수정
Young2un 59ea522
Feat: 이벤트 마지막부분 수정
Young2un 251f43a
Feat: 회원가입 쿠폰존 구현
Young2un ef5ee18
Fix: post 시 메세지를 활용할 수 있게 api 변경
Young2un f674c3a
Feat: 스크롤 감지 active
Young2un 126cb0b
Style: px 실수 수정
Young2un ffd4a89
Refactor: 대소문자 수정
Young2un 8008500
Fix: src/types/CouponTypes.ts 삭제
Young2un 2c35cbd
Merge: branch '161-feat-이벤트페이지' of https://github.com/Quad8/quad8-fro…
Young2un ac1caed
Refactor: 베럴 방식으로 변경
Young2un 607b245
Refactor: 리뷰 반영
Young2un 676151b
Style: 사소한 단어 수정
Young2un 5f5b68a
Merge branch 'develop' into 161-feat-이벤트페이지
Young2un 245737f
Merge: branch '161-feat-이벤트페이지' of https://github.com/Quad8/quad8-fro…
Young2un f77406b
Merge: 풀당겨온거 머지
Young2un 1d9e9f3
Style: 대소문자 이슈,,
Young2un 72afd5a
Style: type 추가
Young2un c742f0b
Fix: 민정님 요청 변경사항
Young2un b3f1f28
Style: 대소문자 오타 수정
Young2un bbacd7a
Refactor: 보경님 리뷰 반영
Young2un 909a0a3
Fix: 머지 안되는 이슈
Young2un 5fddf24
Fix: 풀안되는 이슈
Young2un 2fe7576
Merge: branch 'develop' of https://github.com/Quad8/quad8-front into …
Young2un ed83118
Fix: import 오류 수정
Young2un 227db85
Chore: 이거 안올리니까 푸시가 안됨
Young2un d458106
Fix: import 이슈
Young2un a78119b
Merge branch 'develop' into 161-feat-이벤트페이지
Young2un 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
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.container { | ||
width: 100%; | ||
background-color: $white; | ||
scroll-margin-top: 10rem; | ||
} | ||
|
||
.inner { | ||
@include inner; | ||
} | ||
|
||
.delivery-img-wrap { | ||
position: relative; | ||
} | ||
|
||
.delivery-img-wrap, | ||
.center { | ||
@include flex-center; | ||
} | ||
|
||
.center { | ||
@include pretendard-16-400; | ||
|
||
width: 49.4rem; | ||
margin: 0 auto 20rem; | ||
padding: 3rem; | ||
border: 0.1rem solid $gray-50; | ||
color: $gray-50; | ||
} | ||
|
||
.icon { | ||
position: absolute; | ||
top: 0; | ||
right: 20rem; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { FreeIcon, deliveryImg } from '@/public/index'; | ||
import classNames from 'classnames/bind'; | ||
import Image from 'next/image'; | ||
import styles from './BenefitDelivery.module.scss'; | ||
import EventTitle from './EventTitle'; | ||
|
||
const cn = classNames.bind(styles); | ||
export default function BenefitDelivery() { | ||
return ( | ||
<section id='delivery' className={cn('container')}> | ||
<EventTitle title='배송비 FREE' color='black'> | ||
키득은 하나를 사도 <br /> 배송비 무료 | ||
</EventTitle> | ||
<div className={cn('inner')}> | ||
<div className={cn('delivery-img-wrap')}> | ||
<Image src={deliveryImg} width={557} height={526} alt='무료배송이미지' className={cn('delivery-img')} /> | ||
<FreeIcon className={cn('icon')} /> | ||
</div> | ||
<span className={cn('center')}> 📌 키캡은 세트 구매시에만 적용됩니다</span> | ||
</div> | ||
</section> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.container { | ||
width: 100%; | ||
background-image: linear-gradient(#ecf5fe, #fff); | ||
scroll-margin-top: 10rem; | ||
} | ||
|
||
.inner { | ||
@include inner; | ||
} | ||
|
||
.coupon-area { | ||
@include flex-center; | ||
|
||
flex-wrap: wrap; | ||
margin: 8rem 0; | ||
gap: 5.2rem; | ||
} | ||
|
||
.coupon-down { | ||
position: relative; | ||
width: 49.4rem; | ||
height: 24rem; | ||
} | ||
|
||
.coupon { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
} | ||
|
||
.discount { | ||
position: absolute; | ||
top: 10rem; | ||
left: 3.6rem; | ||
color: $white; | ||
font-size: 7.4rem; | ||
font-style: normal; | ||
font-weight: 900; | ||
line-height: 3.2rem; | ||
} | ||
|
||
.min-price { | ||
position: absolute; | ||
top: 15rem; | ||
left: 4rem; | ||
color: $white; | ||
@include pretendard-24-500; | ||
} | ||
|
||
.button { | ||
max-width: 49.4rem; | ||
margin: 0 auto 16rem; | ||
background-color: #212530; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
'use client'; | ||
|
||
import { Button } from '@/components'; | ||
import SignInModal from '@/components/SignInModal/SignInModal'; | ||
import { COUPON_LIST } from '@/constants/event'; | ||
import { useCreateCouponMutation } from '@/hooks/useCreateCouponMutation'; | ||
import { couponDownImg } from '@/public/index'; | ||
import type { CouponDataType } from '@/types/couponType'; | ||
import { useQueryClient } from '@tanstack/react-query'; | ||
import classNames from 'classnames/bind'; | ||
import Image from 'next/image'; | ||
import Link from 'next/link'; | ||
import { useState } from 'react'; | ||
import styles from './BenefitJoin.module.scss'; | ||
import EventTitle from './EventTitle'; | ||
|
||
const cn = classNames.bind(styles); | ||
|
||
export default function BenefitJoin() { | ||
const [isLoginOpen, setIsLoginOpen] = useState(false); | ||
const queryClient = useQueryClient(); | ||
|
||
const { mutate: createCoupon } = useCreateCouponMutation(); | ||
|
||
const handleClick = async (price: number, minPrice: string) => { | ||
const couponData = queryClient.getQueryData<CouponDataType>(['userData']); | ||
|
||
if (!couponData?.data) { | ||
setIsLoginOpen(true); | ||
return; | ||
} | ||
createCoupon({ | ||
name: '웰컴 쿠폰', | ||
price, | ||
minPrice: +minPrice.slice(0, 1) * 10000, | ||
expiredDate: new Date(), | ||
isWelcome: true, | ||
}); | ||
}; | ||
return ( | ||
<section id='join' className={cn('container')}> | ||
<EventTitle title='WELCOME 쿠폰' color='black'> | ||
즉시 사용가능한 <br /> 신규 가입 쿠폰 증정 | ||
</EventTitle> | ||
<div className={cn('inner')}> | ||
<div className={cn('coupon-area')}> | ||
{COUPON_LIST.map(({ price, minPrice }) => ( | ||
<button | ||
className={cn('coupon-down')} | ||
key={minPrice} | ||
type='button' | ||
onClick={() => handleClick(price, minPrice)} | ||
> | ||
<Image className={cn('coupon')} src={couponDownImg} alt='쿠폰이미지' fill /> | ||
<h3 className={cn('discount')}>{price.toLocaleString()}</h3> | ||
<span className={cn('min-price')}>{minPrice}</span> | ||
</button> | ||
))} | ||
</div> | ||
<Button className={cn('button')} as={Link} href='/'> | ||
쿠폰함 가기 | ||
</Button> | ||
</div> | ||
<SignInModal isOpen={isLoginOpen} onClose={() => setIsLoginOpen(false)} /> | ||
</section> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.container { | ||
width: 100%; | ||
background-color: #3363ff; | ||
scroll-margin-top: 10rem; | ||
} | ||
|
||
.inner { | ||
@include inner; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import classNames from 'classnames/bind'; | ||
import styles from './BenefitRoulette.module.scss'; | ||
import EventTitle from './EventTitle'; | ||
import Wheel from './Wheel'; | ||
|
||
const cn = classNames.bind(styles); | ||
|
||
export default function BenefitRoulette() { | ||
return ( | ||
<section id='roulette' className={cn('container')}> | ||
<EventTitle title='랜덤쿠폰 증정' color='white'> | ||
매일 9시 한번 100% 당첨 <br /> 쿠폰 룰렛 돌리기! | ||
</EventTitle> | ||
<div className={cn('roulette-zone')}> | ||
<Wheel /> | ||
</div> | ||
</section> | ||
); | ||
} |
Oops, something went wrong.
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.
크기가 커서 버튼 말고 div로 감싸도 될 것 같다는 개인적인 생각입니다~