From 0cd35e4af9d9ea2488c33b23df0d50d33c574c8f Mon Sep 17 00:00:00 2001 From: Jiyoung Lim Date: Sat, 12 Aug 2023 13:09:41 +0900 Subject: [PATCH] fix: apply front QA (#141) * Add deck card info to api * Adjust complete page ui * Add metadataBase to metadata --- packages/service-frontend/app/complete/page.tsx | 4 ++-- packages/service-frontend/app/components/common/Header.tsx | 2 +- packages/service-frontend/app/confirm-detail/page.tsx | 6 +++--- packages/service-frontend/app/deck/[id]/play/page.tsx | 5 ++++- packages/service-frontend/app/layout.tsx | 1 + 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/service-frontend/app/complete/page.tsx b/packages/service-frontend/app/complete/page.tsx index 5c93898..918f30b 100644 --- a/packages/service-frontend/app/complete/page.tsx +++ b/packages/service-frontend/app/complete/page.tsx @@ -18,9 +18,9 @@ export default function DeckCreateCompletePage(): JSX.Element { } return ( -
+
router.push('/')} /> -

+

{'축하해!\n게임을 완성했어'}

diff --git a/packages/service-frontend/app/components/common/Header.tsx b/packages/service-frontend/app/components/common/Header.tsx index 007e034..364a519 100644 --- a/packages/service-frontend/app/components/common/Header.tsx +++ b/packages/service-frontend/app/components/common/Header.tsx @@ -23,7 +23,7 @@ function Header({ }: Props): JSX.Element { return (
{leftIconType && (
-
+
- 50 + {deck.cardList.length}
-
뉴 매시업 이미지 게임
+
{deck.name}
{/* 키워드 선택 */} diff --git a/packages/service-frontend/app/deck/[id]/play/page.tsx b/packages/service-frontend/app/deck/[id]/play/page.tsx index 4783b53..1e6ad66 100644 --- a/packages/service-frontend/app/deck/[id]/play/page.tsx +++ b/packages/service-frontend/app/deck/[id]/play/page.tsx @@ -1,9 +1,11 @@ 'use client' import { useCallback, useState } from 'react' +import { useRecoilValue } from 'recoil' import { Button, SecondaryButton } from '@ppoba/ui' import { Header } from '@/app/components' +import { deckFormAtomState } from '@/store/deck' import Card from './Card' import { CardStyle } from './constant' @@ -14,6 +16,7 @@ export default function DeckPlay(): JSX.Element { const [isShowBack, setIsShowBack] = useState(false) const [currentIndex, setCurrentIndex] = useState(0) const [cards, setCard] = useState([]) + const deck = useRecoilValue(deckFormAtomState) const handleClickShuffleButton = useCallback(() => { // currentIndex부터 마지막카드까지만 섞는다. @@ -38,7 +41,7 @@ export default function DeckPlay(): JSX.Element { {/* 게임 정보 */}
- 뉴 매시업 이미지 게임 + {deck.name}

남은 카드 {cards.length - currentIndex}장 diff --git a/packages/service-frontend/app/layout.tsx b/packages/service-frontend/app/layout.tsx index 8625d73..523ea05 100644 --- a/packages/service-frontend/app/layout.tsx +++ b/packages/service-frontend/app/layout.tsx @@ -13,6 +13,7 @@ export const metadata: Metadata = { title: 'PPOBA - 뽀바', description: '뽀바, 너만의 카드게임을 즐겨봐', themeColor: '#F7F7F7', + metadataBase: new URL('https://ppoba.com'), } export default async function RootLayout({