-
Notifications
You must be signed in to change notification settings - Fork 1
[Feat/#38] 리뷰생성완료 화면 UI 제작 #43
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3c41bb0
feat: 리뷰 생성 결과 UI구현
lgrin-byte afd19ab
feat: confetti 추가
lgrin-byte eced13b
feat: canvas-confetti 패키지 재설치
lgrin-byte 38d1423
chore: css 파일 제거
lgrin-byte 77ed41d
refactor: 사용하지 않는 파일 및 패키지 제거
lgrin-byte ba4d549
refactor: 코드리뷰 반영 Confetti 위치 변경
lgrin-byte 1e25c3e
chore: 이미지 추가 및 네이밍 수정
lgrin-byte c8fe3e5
chore: 이미지 네이밍 수정
lgrin-byte 97ba18c
refactor: 미사용 코드 수정, 홈으로 가기 안내 모달 연결
sikkzz 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file added
BIN
+11.6 KB
.yarn/cache/@types-canvas-confetti-npm-1.9.0-128dcb43d0-ffe2c674d4.zip
Binary file not shown.
Binary file not shown.
This file contains hidden or 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.
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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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,60 @@ | ||
| .ReceiptResult { | ||
| padding: 1.25rem; | ||
| padding-bottom: 2.5rem; | ||
| height: calc(100vh - 2.75rem); | ||
| overflow: hidden; | ||
| position: relative; | ||
| display: flex; | ||
| flex-direction: column; | ||
| background: var(--color-bg-gradient); | ||
| justify-content: space-between; | ||
|
|
||
| &::before { | ||
| content: ""; | ||
| background: url("/src/assets/svg/img-graphic-main.svg") center no-repeat; | ||
| background-size: 100% 16.375rem; | ||
| filter: blur(4.625rem); | ||
| position: absolute; | ||
| top: 0; | ||
| left: 0; | ||
| right: 0; | ||
| bottom: 0; | ||
| z-index: 0; | ||
| } | ||
| } | ||
|
|
||
| .Top { | ||
| z-index: 1; | ||
|
|
||
| .TitleBox { | ||
| display: flex; | ||
| justify-content: center; | ||
| margin: 1.875rem 0; | ||
| } | ||
| } | ||
|
|
||
| .Bottom { | ||
| align-items: center; | ||
| gap: 0.875rem; | ||
| z-index: 1; | ||
| display: grid; | ||
| grid-template-columns: 30% 1fr; | ||
| } | ||
|
|
||
| .ReceiptImage { | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| z-index: 1; | ||
|
|
||
| & > img { | ||
| width: 7.5rem; | ||
| height: 7.5rem; | ||
| } | ||
| } | ||
|
|
||
| .IconBtn { | ||
| width: 6.15625rem; | ||
| margin-top: 0.625rem; | ||
| margin-left: auto; | ||
| } |
This file contains hidden or 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 @@ | ||
| import { useEffect } from "react"; | ||
|
|
||
| import confetti from "canvas-confetti"; | ||
|
|
||
| import HomeNavigateConfirmModal from "@/components/HomeNavigateConfirmModal/HomeNavigateConfirmModal"; | ||
| import styles from "@/components/ReceiptResult/ReceiptResult.module.scss"; | ||
| import Button from "@/components/ui/Button/Button"; | ||
| import IconButton from "@/components/ui/IconButton/IconButton"; | ||
| import Text from "@/components/ui/Text/Text"; | ||
|
|
||
| import { useOverlay } from "@/hooks/common/useOverlay"; | ||
|
|
||
| import type { Options as ConfettiOptions } from "canvas-confetti"; | ||
|
|
||
| const ReceiptResult = () => { | ||
| const { isOpen, handleClose, handleOpen } = useOverlay(); | ||
|
|
||
| const handleConfetti = () => { | ||
| const setting: ConfettiOptions = { | ||
| particleCount: 100, | ||
| spread: 100, | ||
| origin: { y: 0.2 }, | ||
| colors: ["#f4abfe", "#cd90f2", "#eff0ff", "#6f91ff"], | ||
| ticks: 50, | ||
| }; | ||
|
|
||
| confetti({ | ||
| ...setting, | ||
| }); | ||
| }; | ||
|
|
||
| useEffect(() => { | ||
| handleConfetti(); | ||
| }, []); | ||
|
|
||
| return ( | ||
| <div className={styles.ReceiptResult}> | ||
| <div className={styles.Top}> | ||
| <div className={styles.ReceiptImage}> | ||
| <img src="/assets/img/img-style-cute-circle.png" alt="mainLogo" /> | ||
| </div> | ||
| <div className={styles.TitleBox}> | ||
| <Text variant="titleM" color="gradient" as="h1" truncated> | ||
| 리뷰를 만들었어요! | ||
| </Text> | ||
| </div> | ||
|
|
||
| <Text variant="bodyLg" color="primary"> | ||
| 오늘 처음으로 청담커피 앤 토스트에서 주문했어요.. 매장도 깔끔하고 직원들도 친절해요! | ||
| 음료랑 토스트 세트 시켰는데 가성비가 좋네요… 맛도 좋고 양도 많아요!! 다음에도 또 시켜먹을 | ||
| 거예요. | ||
| </Text> | ||
| <div className={styles.IconBtn}> | ||
| <IconButton text="복사하기" iconName="paste" size="sm" /> | ||
| </div> | ||
| </div> | ||
| <div className={styles.Bottom}> | ||
| <Button text="다시생성" variant="secondary" /> | ||
| <Button text="홈으로 가기" onClick={handleOpen} /> | ||
| </div> | ||
|
|
||
| <HomeNavigateConfirmModal isOpen={isOpen} handleClose={handleClose} /> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default ReceiptResult; |
This file contains hidden or 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,16 @@ | ||
| import Navbar from "@/components/common/Navbar/Navbar"; | ||
| import ReceiptResult from "@/components/ReceiptResult/ReceiptResult"; | ||
| import Icon from "@/components/ui/Icon/Icon"; | ||
|
|
||
| export default function ReceiptResultPage() { | ||
| return ( | ||
| <> | ||
| <Navbar> | ||
| <Navbar.LeftButton> | ||
| <Icon name="leftArrow" /> | ||
| </Navbar.LeftButton> | ||
| </Navbar> | ||
| <ReceiptResult /> | ||
| </> | ||
| ); | ||
| } |
This file contains hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.