Skip to content

Commit

Permalink
refactor: 리뷰 결과 생성 페이지 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
sikkzz committed Feb 21, 2025
1 parent c1b0019 commit bd6fd21
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 20 deletions.
37 changes: 27 additions & 10 deletions src/pages/ReviewResultPage/ReviewResultPage.module.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.ReviewResult {
padding: 2.5rem 1.25rem;
padding-bottom: 9rem;
height: 100vh;
overflow: hidden;
position: relative;
Expand Down Expand Up @@ -40,18 +41,34 @@
}

.Bottom {
display: flex;
flex-direction: column;
gap: 1.25rem;
}

.ButtonBox {
align-items: center;
gap: 0.875rem;
z-index: 1;
z-index: 2;
position: fixed;
width: 100%;
height: 7rem;
left: 0;
bottom: 0;
display: grid;
grid-template-columns: 30% 1fr;
margin-top: 1.25rem;
gap: 0.875rem;
background: linear-gradient(
180deg,
rgba(220, 220, 232, 0) 0%,
rgba(220, 220, 232, 1) 20%,
rgba(220, 220, 232, 1) 100%
);

& > button {
margin-top: 1.25rem;

&:first-of-type {
width: calc(100% - 1.25rem);
margin-left: 1.25rem;
}

&:last-of-type {
width: calc(100% - 1.25rem);
}
}
}

.Image {
Expand Down
12 changes: 2 additions & 10 deletions src/pages/ReviewResultPage/ReviewResultPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ import { useAppBridge } from "@/components/provider/AppBridgeProvider/AppBridgeP
import Button from "@/components/ui/Button/Button";
import IconButton from "@/components/ui/IconButton/IconButton";
import Text from "@/components/ui/Text/Text";
import Toast from "@/components/ui/Toast/Toast";

import { useOverlay } from "@/hooks/common/useOverlay";
import { useRoute } from "@/hooks/common/useRoute";
import useToast from "@/hooks/common/useToast";

import styles from "@/pages/ReviewResultPage/ReviewResultPage.module.scss";

Expand All @@ -30,7 +28,6 @@ export default function ReviewResultPage() {
const { navigateToCreateReviewFail, navigateToLoading } = useRoute();

const { isOpen, handleClose, handleOpen } = useOverlay();
const { isToast, showToast } = useToast(1000);

const { ocrText, hashTag, reviewStyle } = createReviewData;

Expand Down Expand Up @@ -89,19 +86,14 @@ export default function ReviewResultPage() {
size="sm"
onClick={() => {
send({ type: AppBridgeMessageType.COPY, payload: { review: generateReviewData } });

showToast();
}}
/>
</div>
</div>

<div className={styles.Bottom}>
{isToast && <Toast text="리뷰가 복사되었어요." />}
<div className={styles.ButtonBox}>
<Button text="다시생성" variant="secondary" onClick={handleRetryCreateReview} />
<Button text="홈으로 가기" onClick={handleOpen} />
</div>
<Button text="다시생성" variant="secondary" onClick={handleRetryCreateReview} />
<Button text="홈으로 가기" onClick={handleOpen} />
</div>

<HomeNavigateConfirmModal isOpen={isOpen} handleClose={handleClose} />
Expand Down

0 comments on commit bd6fd21

Please sign in to comment.