From 19771ee9099f7572712ebdaf1ce2dbd582869c78 Mon Sep 17 00:00:00 2001 From: Junho Jeon Date: Tue, 7 Nov 2023 15:13:44 +0900 Subject: [PATCH 01/14] [] --- .husky/prepare-commit-msg | 54 +++++++++---------- .../modal/modalType/TournamentModal.tsx | 14 +++++ .../tournament/TournamentRegistryModal.tsx | 9 ++++ pages/index.tsx | 3 ++ pages/tournament.tsx | 46 ++++++++++++++++ .../TournamentContainer.module.scss | 53 ++++++++++++++++++ types/modalTypes.ts | 13 ++++- utils/recoil/modal.ts | 3 ++ 8 files changed, 167 insertions(+), 28 deletions(-) create mode 100644 components/modal/modalType/TournamentModal.tsx create mode 100644 components/modal/tournament/TournamentRegistryModal.tsx create mode 100644 pages/tournament.tsx create mode 100644 styles/tournament/TournamentContainer.module.scss diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg index 692f3bfe7..218e95985 100755 --- a/.husky/prepare-commit-msg +++ b/.husky/prepare-commit-msg @@ -11,38 +11,38 @@ for exclude_branch in "${exclude_branch_list[@]}"; do fi done -# if branch name is not valid, exit -contains_issue_key=$(echo $branch_name | grep -c "GGFE-") -if [[ $contains_issue_key -eq 0 ]]; then - echo "브랜치명에 이슈 키를 포함해주세요." - exit 1 -fi +# # if branch name is not valid, exit +# contains_issue_key=$(echo $branch_name | grep -c "GGFE-") +# if [[ $contains_issue_key -eq 0 ]]; then +# echo "브랜치명에 이슈 키를 포함해주세요." +# exit 1 +# fi # get issue key from branch name -issue_key=$(echo $branch_name | grep -o "GGFE-[0-9]*") +# issue_key=$(echo $branch_name | grep -o "GGFE-[0-9]*") -# if issue key is not valid, exit -if ! [[ $issue_key =~ ^GGFE-[0-9]+$ ]]; then - echo "브랜치명의 이슈 키가 올바른 형식이 아닙니다." - exit 1 -fi +# # if issue key is not valid, exit +# if ! [[ $issue_key =~ ^GGFE-[0-9]+$ ]]; then +# echo "브랜치명의 이슈 키가 올바른 형식이 아닙니다." +# exit 1 +# fi # get commit message -commit_msg_title=$(head -n 1 $1) -commit_msg_body=$(tail -n +2 $1) -# get issue key from commit message -issue_key_from_commit_msg=$(echo $commit_msg_title | grep -o "\[GGFE-[0-9]*\]") # [GGFE-1234] - -# if this commit is merge commit, exit 0 -if [[ $commit_msg_title =~ ^Merge ]]; then - exit 0 -fi - -# if there is issue key in commit message but not equal to issue key from branch name, exit -if [[ -n $issue_key_from_commit_msg ]] && [[ "$issue_key_from_commit_msg" != "[$issue_key]" ]]; then - echo "커밋 메시지의 이슈 키가 브랜치명의 이슈 키와 일치하지 않습니다." - exit 1 -fi +# commit_msg_title=$(head -n 1 $1) +# commit_msg_body=$(tail -n +2 $1) +# # get issue key from commit message +# issue_key_from_commit_msg=$(echo $commit_msg_title | grep -o "\[GGFE-[0-9]*\]") # [GGFE-1234] + +# # if this commit is merge commit, exit 0 +# if [[ $commit_msg_title =~ ^Merge ]]; then +# exit 0 +# fi + +# # if there is issue key in commit message but not equal to issue key from branch name, exit +# if [[ -n $issue_key_from_commit_msg ]] && [[ "$issue_key_from_commit_msg" != "[$issue_key]" ]]; then +# echo "커밋 메시지의 이슈 키가 브랜치명의 이슈 키와 일치하지 않습니다." +# exit 1 +# fi # if issue key from commit message is equal to issue key from branch name, exit if [[ -n $issue_key_from_commit_msg ]]; then diff --git a/components/modal/modalType/TournamentModal.tsx b/components/modal/modalType/TournamentModal.tsx new file mode 100644 index 000000000..de2ff0a44 --- /dev/null +++ b/components/modal/modalType/TournamentModal.tsx @@ -0,0 +1,14 @@ +import { useRecoilValue } from 'recoil'; +import { modalState } from 'utils/recoil/modal'; +import TournamentRegistryModal from '../tournament/TournamentRegistryModal'; + +export default function TournamentModal() { + const { modalName, tournamentInfo } = useRecoilValue(modalState); + + const content: { [key: string]: JSX.Element | null } = { + 'TOURNAMENT-REGISTRY': , + }; + + if (!modalName) return null; + return content[modalName]; +} diff --git a/components/modal/tournament/TournamentRegistryModal.tsx b/components/modal/tournament/TournamentRegistryModal.tsx new file mode 100644 index 000000000..c75229b18 --- /dev/null +++ b/components/modal/tournament/TournamentRegistryModal.tsx @@ -0,0 +1,9 @@ +import { TournamentInfo } from 'types/modalTypes'; + +export default function TournamentRegistryModal({ + tournamentDate, + tournamentDiscription, + tournamentName, +}: TournamentInfo) { + return
TournamentRegistryModal;
; +} diff --git a/pages/index.tsx b/pages/index.tsx index 14a26465b..76ee08baa 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -9,6 +9,9 @@ const Home: NextPage = () => {
+
+
+
diff --git a/pages/tournament.tsx b/pages/tournament.tsx new file mode 100644 index 000000000..24bc879a4 --- /dev/null +++ b/pages/tournament.tsx @@ -0,0 +1,46 @@ +import { useSetRecoilState } from 'recoil'; +import { Modal } from 'types/modalTypes'; +import { modalState } from 'utils/recoil/modal'; +import styles from 'styles/tournament/TournamentContainer.module.scss'; + +// 내부의 토너먼트 보여주는 부분만 Component화 하면될까? 다른곳에서도 쓰일까? +// 진행중인 토너먼트의 Bracket을 보여주는 부분도 다른곳에서도 쓸수있지않나? + +export default function Tournament() { + const setModal = useSetRecoilState(modalState); + + const handleTournament = () => { + setModal({ + modalName: 'TOURNAMENT-REGISTRY', + tournamentInfo: { + tournamentName: '제1회 루키토너먼트', + tournamentDiscription: '첫 대회', + tournamentDate: '2023:12:12:24:00', + }, + }); + }; + return ( +
+

Tournament

+
+

열려있는 토너먼트

+
+
제1회 루키 토너먼트
+
제2회 루키 토너먼트
+
제3회 루키 토너먼트
+
제3회 루키 토너먼트
+
제3회 루키 토너먼트
+
제3회 루키 토너먼트
+
제3회 루키 토너먼트
+
제3회 루키 토너먼트
+
제3회 루키 토너먼트
+
제3회 루키 토너먼트
+
+

진행중인 토너먼트

+
+
무언가 토너먼트의 사진
+
+
+
+ ); +} diff --git a/styles/tournament/TournamentContainer.module.scss b/styles/tournament/TournamentContainer.module.scss new file mode 100644 index 000000000..8ca780165 --- /dev/null +++ b/styles/tournament/TournamentContainer.module.scss @@ -0,0 +1,53 @@ +@import 'styles/common.scss'; + +.pageWrap { + @include pageWrap; +} + +.title { + @include pageTitle; + width: fit-content; + cursor: pointer; +} + +.tournamentContainer { + display: flex; + height: 60vh; + flex-direction: column; + padding: 1rem 1rem 0rem; + overflow-y: scroll; + background: rgba(255, 255, 255, 0.2); + border-radius: $small-radius; +} + +.waitTournamentBox { + display: flex; + width: 100%; + flex: 1; + flex-direction: column; + padding: 0.2rem 0 0.2rem 0.2rem; + margin-bottom: 1rem; + overflow-x: hidden; + overflow-y: scroll; + background: #d4b8f2; + border-radius: 0.3rem; +} + +.openTournamentBox { + display: flex; + width: 100%; + flex: 3; + flex-direction: column; + padding: 0.2rem 0 0.2rem 0.2rem; + margin-bottom: 1rem; + overflow-x: scroll; + overflow-y: scroll; + background: #d4b8f2; + border-radius: 0.3rem; +} + +.tournamentText { + font-weight: 1000; + color: black; + text-align: center; /* 텍스트를 가로로 중앙에 정렬 */ +} diff --git a/types/modalTypes.ts b/types/modalTypes.ts index 27906a532..0fc099149 100644 --- a/types/modalTypes.ts +++ b/types/modalTypes.ts @@ -27,8 +27,11 @@ type PurchaseModal = 'BUY' | 'GIFT' | 'NO_COIN'; type UseItemModal = ItemType | 'GACHA'; type EditItemModal = 'MEGAPHONE'; + type StoreModal = 'MANUAL' | 'COIN_HISTORY'; +type TournamentModal = 'REGISTRY'; + type AdminModal = | 'PROFILE' | 'USER-COIN' @@ -59,7 +62,8 @@ type ModalName = | `USE-ITEM-${UseItemModal}` | `EDIT-ITEM-${EditItemModal}` | `STORE-${StoreModal}` - | `PURCHASE-${PurchaseModal}`; + | `PURCHASE-${PurchaseModal}` + | `TOURNAMENT-${TournamentModal}`; export interface Cancel { startTime: string; @@ -88,6 +92,12 @@ export interface Manual { radioMode: MatchMode; } +export interface TournamentInfo { + tournamentName?: string; + tournamentDiscription?: string; + tournamentDate?: string; +} + export interface PriceTag { itemId: number; product: string; @@ -129,4 +139,5 @@ export interface Modal { isAttended?: boolean; totalCoin?: ICoin; randomItem?: IRandomItem; + tournamentInfo?: TournamentInfo; } diff --git a/utils/recoil/modal.ts b/utils/recoil/modal.ts index 5821a6ba7..f0f1911c8 100644 --- a/utils/recoil/modal.ts +++ b/utils/recoil/modal.ts @@ -13,12 +13,15 @@ export const modalTypeState = selector({ let modalType = ''; const normalPrefixes = ['EVENT', 'MENU', 'MATCH', 'USER', 'FIXED']; const storePrefixes = ['COIN', 'STORE', 'PURCHASE', 'USE', 'EDIT']; + const tournamentPrefixes = ['TOURNAMENT']; const prefix = get(modalState).modalName?.split('-')[0] || ''; if (normalPrefixes.includes(prefix)) { modalType = 'NORMAL'; } else if (storePrefixes.includes(prefix)) { modalType = 'STORE'; + } else if (tournamentPrefixes.includes(prefix)) { + modalType = 'TOURNAMENT'; } else if (prefix === 'ADMIN') { modalType = 'ADMIN'; } From 516f0751c2418c52611eafd91faeab15bda861a9 Mon Sep 17 00:00:00 2001 From: Junho Jeon Date: Tue, 7 Nov 2023 16:15:04 +0900 Subject: [PATCH 02/14] [] --- components/main/Section.tsx | 2 ++ components/tournament/EmptyTournament.tsx | 3 +++ pages/index.tsx | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 components/tournament/EmptyTournament.tsx diff --git a/components/main/Section.tsx b/components/main/Section.tsx index e4d0e1c83..7fbc491a6 100644 --- a/components/main/Section.tsx +++ b/components/main/Section.tsx @@ -3,6 +3,7 @@ import React from 'react'; import { FaChevronRight } from 'react-icons/fa'; import GameResult from 'components/game/GameResult'; import RankListMain from 'components/rank/topRank/RankListMain'; +import EmptyTournament from 'components/tournament/EmptyTournament'; import styles from 'styles/main/Section.module.scss'; type SectionProps = { @@ -17,6 +18,7 @@ export default function Section({ sectionTitle, path }: SectionProps) { const pathCheck: pathType = { game: , rank: , + tournament: , }; return ( diff --git a/components/tournament/EmptyTournament.tsx b/components/tournament/EmptyTournament.tsx new file mode 100644 index 000000000..711e75b8b --- /dev/null +++ b/components/tournament/EmptyTournament.tsx @@ -0,0 +1,3 @@ +export default function EmptyTournament() { + return
; +} diff --git a/pages/index.tsx b/pages/index.tsx index 76ee08baa..9ceb0d2c3 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -9,7 +9,7 @@ const Home: NextPage = () => {
-
+
From f1b422c16bd17beb5c51bb827c4e16165f9e55b2 Mon Sep 17 00:00:00 2001 From: Junho Jeon Date: Tue, 7 Nov 2023 17:58:41 +0900 Subject: [PATCH 03/14] [] --- components/rank/topRank/RankListMain.tsx | 2 +- styles/rank/RankListMain.module.scss | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/components/rank/topRank/RankListMain.tsx b/components/rank/topRank/RankListMain.tsx index cecf97d2a..2d5f8f8e7 100644 --- a/components/rank/topRank/RankListMain.tsx +++ b/components/rank/topRank/RankListMain.tsx @@ -53,7 +53,7 @@ export default function RankListMain({ isMain, season }: RankListMainProps) { )); return ( -
+
{bangElements}
{rank !== undefined && diff --git a/styles/rank/RankListMain.module.scss b/styles/rank/RankListMain.module.scss index a0b1f3b78..de092ecaa 100644 --- a/styles/rank/RankListMain.module.scss +++ b/styles/rank/RankListMain.module.scss @@ -1,5 +1,9 @@ @import 'styles/common.scss'; +.RankContainer { + z-index: 0; +} + .mainContainer { position: relative; top: 1.5rem; @@ -82,8 +86,9 @@ .bangContainer { display: flex; - justify-content: space-around; margin-top: -7.5rem; + pointer-events: none; + justify-content: space-around; } .bang { From ae345d41bf6778375101604f464c4778ec097292 Mon Sep 17 00:00:00 2001 From: Junho Jeon Date: Tue, 7 Nov 2023 18:00:21 +0900 Subject: [PATCH 04/14] [] --- components/main/Section.tsx | 3 +-- components/tournament/EmptyTournament.tsx | 3 --- styles/main/Section.module.scss | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) delete mode 100644 components/tournament/EmptyTournament.tsx diff --git a/components/main/Section.tsx b/components/main/Section.tsx index 7fbc491a6..e00303f4a 100644 --- a/components/main/Section.tsx +++ b/components/main/Section.tsx @@ -3,7 +3,6 @@ import React from 'react'; import { FaChevronRight } from 'react-icons/fa'; import GameResult from 'components/game/GameResult'; import RankListMain from 'components/rank/topRank/RankListMain'; -import EmptyTournament from 'components/tournament/EmptyTournament'; import styles from 'styles/main/Section.module.scss'; type SectionProps = { @@ -18,7 +17,7 @@ export default function Section({ sectionTitle, path }: SectionProps) { const pathCheck: pathType = { game: , rank: , - tournament: , + tournament: <>, }; return ( diff --git a/components/tournament/EmptyTournament.tsx b/components/tournament/EmptyTournament.tsx deleted file mode 100644 index 711e75b8b..000000000 --- a/components/tournament/EmptyTournament.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function EmptyTournament() { - return
; -} diff --git a/styles/main/Section.module.scss b/styles/main/Section.module.scss index a220211e3..eecec2c95 100644 --- a/styles/main/Section.module.scss +++ b/styles/main/Section.module.scss @@ -2,7 +2,6 @@ .sectionWrap { position: relative; - z-index: 1; margin-top: 2.5rem; &.mainRank { margin-top: 1rem; @@ -23,6 +22,7 @@ align-items: center; } > button { + z-index: 10; width: 1.563rem; height: 1.563rem; color: #ffffff; From 96b8d8acaab3b9778c5742c5d5c9464cd88a3403 Mon Sep 17 00:00:00 2001 From: Junho Jeon Date: Tue, 7 Nov 2023 20:08:23 +0900 Subject: [PATCH 05/14] =?UTF-8?q?[Feat]=20=ED=86=A0=EB=84=88=EB=A8=BC?= =?UTF-8?q?=ED=8A=B8=20=EC=B0=B8=EA=B0=80=EC=9A=A9=20=EB=AA=A8=EB=8B=AC=20?= =?UTF-8?q?=EC=83=98=ED=94=8C=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modal/ModalProvider.tsx | 3 ++ .../tournament/TournamentRegistryModal.tsx | 42 ++++++++++++++++++- pages/tournament.tsx | 14 ++----- 3 files changed, 47 insertions(+), 12 deletions(-) diff --git a/components/modal/ModalProvider.tsx b/components/modal/ModalProvider.tsx index 1b6f6d4d6..abbf1aa7f 100644 --- a/components/modal/ModalProvider.tsx +++ b/components/modal/ModalProvider.tsx @@ -6,6 +6,7 @@ import AdminModal from 'components/modal/modalType/AdminModal'; import NormalModal from 'components/modal/modalType/NormalModal'; import StoreModal from 'components/modal/modalType/StoreModal'; import styles from 'styles/modal/Modal.module.scss'; +import TournamentModal from './modalType/TournamentModal'; export default function ModalProvider() { const [{ modalName }, setModal] = useRecoilState(modalState); @@ -43,6 +44,8 @@ export default function ModalProvider() { ) : modalType === 'ADMIN' ? ( + ) : modalType === 'TOURNAMENT' ? ( + ) : null}
) diff --git a/components/modal/tournament/TournamentRegistryModal.tsx b/components/modal/tournament/TournamentRegistryModal.tsx index c75229b18..8b4b29aff 100644 --- a/components/modal/tournament/TournamentRegistryModal.tsx +++ b/components/modal/tournament/TournamentRegistryModal.tsx @@ -1,9 +1,49 @@ +import dynamic from 'next/dynamic'; +import { useSetRecoilState } from 'recoil'; import { TournamentInfo } from 'types/modalTypes'; +import { QUILL_FORMATS } from 'types/quillTypes'; +import { modalState } from 'utils/recoil/modal'; +import { + ModalButtonContainer, + ModalButton, +} from 'components/modal/ModalButton'; +import styles from 'styles/modal/event/AnnouncementModal.module.scss'; +import 'react-quill/dist/quill.bubble.css'; + +const Quill = dynamic(() => import('react-quill'), { + ssr: false, + loading: () =>

Loading ...

, +}); export default function TournamentRegistryModal({ tournamentDate, tournamentDiscription, tournamentName, }: TournamentInfo) { - return
TournamentRegistryModal;
; + const setModal = useSetRecoilState(modalState); + + const registTournament = () => { + console.log('토너먼트에 등록하시겠습니까.'); + }; + + const closeModalButtonHandler = () => { + setModal({ modalName: null }); + }; + + return ( +
+
{tournamentName}
+
{tournamentDate}
+ + + + +
+ ); } diff --git a/pages/tournament.tsx b/pages/tournament.tsx index 24bc879a4..f87e08fb6 100644 --- a/pages/tournament.tsx +++ b/pages/tournament.tsx @@ -14,7 +14,7 @@ export default function Tournament() { modalName: 'TOURNAMENT-REGISTRY', tournamentInfo: { tournamentName: '제1회 루키토너먼트', - tournamentDiscription: '첫 대회', + tournamentDiscription: '첫번재 루키 토너먼트 대회입니다 ! ', tournamentDate: '2023:12:12:24:00', }, }); @@ -25,16 +25,8 @@ export default function Tournament() {

열려있는 토너먼트

-
제1회 루키 토너먼트
-
제2회 루키 토너먼트
-
제3회 루키 토너먼트
-
제3회 루키 토너먼트
-
제3회 루키 토너먼트
-
제3회 루키 토너먼트
-
제3회 루키 토너먼트
-
제3회 루키 토너먼트
-
제3회 루키 토너먼트
-
제3회 루키 토너먼트
+
제1회 루키 토너먼트
+
제2회 루키 토너먼트

진행중인 토너먼트

From 944b7079f59e701024d2f724a3d41c53c6645b5a Mon Sep 17 00:00:00 2001 From: Junho Jeon Date: Wed, 8 Nov 2023 14:09:57 +0900 Subject: [PATCH 06/14] =?UTF-8?q?[Style]=20=ED=86=A0=EB=84=88=EB=A8=BC?= =?UTF-8?q?=ED=8A=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=8A=A4=ED=83=80?= =?UTF-8?q?=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/tournament/TournamentCard.tsx | 3 +++ styles/tournament/TournamentContainer.module.scss | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 components/tournament/TournamentCard.tsx diff --git a/components/tournament/TournamentCard.tsx b/components/tournament/TournamentCard.tsx new file mode 100644 index 000000000..edfd300fc --- /dev/null +++ b/components/tournament/TournamentCard.tsx @@ -0,0 +1,3 @@ +export default function TournamentCard() { + return
토너먼트 카드
; +} diff --git a/styles/tournament/TournamentContainer.module.scss b/styles/tournament/TournamentContainer.module.scss index 8ca780165..528d42f65 100644 --- a/styles/tournament/TournamentContainer.module.scss +++ b/styles/tournament/TournamentContainer.module.scss @@ -16,7 +16,7 @@ flex-direction: column; padding: 1rem 1rem 0rem; overflow-y: scroll; - background: rgba(255, 255, 255, 0.2); + background: #d4b8f2; border-radius: $small-radius; } @@ -29,7 +29,8 @@ margin-bottom: 1rem; overflow-x: hidden; overflow-y: scroll; - background: #d4b8f2; + background: rgba(112, 0, 255, 0.17); + border: 2px solid #c67dff; border-radius: 0.3rem; } @@ -42,7 +43,8 @@ margin-bottom: 1rem; overflow-x: scroll; overflow-y: scroll; - background: #d4b8f2; + background: rgba(112, 0, 255, 0.17); + border: 2px solid #c67dff; border-radius: 0.3rem; } @@ -51,3 +53,10 @@ color: black; text-align: center; /* 텍스트를 가로로 중앙에 정렬 */ } + +.tournamentCard { + display: flex; + width: 100%; + justify-content: center; + align-items: center; +} From 383ab8e1e609c65a6f6868bfe739be0c9b9ca017 Mon Sep 17 00:00:00 2001 From: Junho Jeon Date: Wed, 8 Nov 2023 15:19:35 +0900 Subject: [PATCH 07/14] =?UTF-8?q?[Feat]=20=EB=8C=80=EA=B8=B0=EC=A4=91?= =?UTF-8?q?=EC=9D=B8=20=ED=86=A0=EB=84=88=EB=A8=BC=ED=8A=B8=EB=A5=BC=20?= =?UTF-8?q?=EB=B3=B4=EC=97=AC=EC=A3=BC=EB=8A=94=20Card=20=EC=BB=B4?= =?UTF-8?q?=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/tournament/TournamentCard.tsx | 11 +++++++++-- pages/tournament.tsx | 12 ++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/components/tournament/TournamentCard.tsx b/components/tournament/TournamentCard.tsx index edfd300fc..d931d5113 100644 --- a/components/tournament/TournamentCard.tsx +++ b/components/tournament/TournamentCard.tsx @@ -1,3 +1,10 @@ -export default function TournamentCard() { - return
토너먼트 카드
; +import { TournamentInfo } from 'types/modalTypes'; +import styles from 'styles/tournament/TournamentCard.module.scss'; + +export default function TournamentCard({ tournamentName }: TournamentInfo) { + return ( +
+
{tournamentName}
+
+ ); } diff --git a/pages/tournament.tsx b/pages/tournament.tsx index f87e08fb6..062c01eef 100644 --- a/pages/tournament.tsx +++ b/pages/tournament.tsx @@ -1,6 +1,7 @@ import { useSetRecoilState } from 'recoil'; import { Modal } from 'types/modalTypes'; import { modalState } from 'utils/recoil/modal'; +import TournamentCard from 'components/tournament/TournamentCard'; import styles from 'styles/tournament/TournamentContainer.module.scss'; // 내부의 토너먼트 보여주는 부분만 Component화 하면될까? 다른곳에서도 쓰일까? @@ -23,12 +24,15 @@ export default function Tournament() {

Tournament

-

열려있는 토너먼트

+
대기중인 토너먼트
-
제1회 루키 토너먼트
-
제2회 루키 토너먼트
+ + + + +
-

진행중인 토너먼트

+
진행중인 토너먼트
무언가 토너먼트의 사진
From 439c29d91596ea2b82061998110edaa479c9a25f Mon Sep 17 00:00:00 2001 From: Junho Jeon Date: Wed, 8 Nov 2023 15:20:16 +0900 Subject: [PATCH 08/14] =?UTF-8?q?[Style]=20=EB=8C=80=EA=B8=B0=EC=A4=91?= =?UTF-8?q?=EC=9D=B8=20=ED=86=A0=EB=84=88=EB=A8=BC=ED=8A=B8=20Card=20?= =?UTF-8?q?=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- styles/tournament/TournamentCard.module.scss | 16 ++++++++++++ .../TournamentContainer.module.scss | 25 +++++++++++-------- 2 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 styles/tournament/TournamentCard.module.scss diff --git a/styles/tournament/TournamentCard.module.scss b/styles/tournament/TournamentCard.module.scss new file mode 100644 index 000000000..c175a9325 --- /dev/null +++ b/styles/tournament/TournamentCard.module.scss @@ -0,0 +1,16 @@ +.tournamentCardContainer { + display: flex; + width: 100%; + padding: 1rem; + margin-bottom: 1rem; + background-color: black; + border: 2px solid black; + border-radius: 0.3rem; + + .text { + overflow: hidden; + color: white; + text-overflow: ellipsis; + white-space: nowrap; + } +} diff --git a/styles/tournament/TournamentContainer.module.scss b/styles/tournament/TournamentContainer.module.scss index 528d42f65..734aa32bd 100644 --- a/styles/tournament/TournamentContainer.module.scss +++ b/styles/tournament/TournamentContainer.module.scss @@ -23,10 +23,11 @@ .waitTournamentBox { display: flex; width: 100%; - flex: 1; + flex: 5; flex-direction: column; - padding: 0.2rem 0 0.2rem 0.2rem; - margin-bottom: 1rem; + justify-content: center; + align-items: center; + padding: 2rem 1rem 0; overflow-x: hidden; overflow-y: scroll; background: rgba(112, 0, 255, 0.17); @@ -37,7 +38,7 @@ .openTournamentBox { display: flex; width: 100%; - flex: 3; + flex: 15; flex-direction: column; padding: 0.2rem 0 0.2rem 0.2rem; margin-bottom: 1rem; @@ -48,15 +49,19 @@ border-radius: 0.3rem; } -.tournamentText { - font-weight: 1000; +.tournamentTextWait { + display: flex; + flex: 1; + font-weight: 700; color: black; text-align: center; /* 텍스트를 가로로 중앙에 정렬 */ } -.tournamentCard { +.tournamentTextOpen { display: flex; - width: 100%; - justify-content: center; - align-items: center; + flex: 1; + padding-top: 1rem; + font-weight: 700; + color: black; + text-align: center; /* 텍스트를 가로로 중앙에 정렬 */ } From dbd27108dbeabdaacb7599dd25efefb5df692cde Mon Sep 17 00:00:00 2001 From: Junho Jeon Date: Wed, 8 Nov 2023 16:07:46 +0900 Subject: [PATCH 09/14] =?UTF-8?q?[Feat]=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=EC=9A=A9=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/tournament.tsx | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/pages/tournament.tsx b/pages/tournament.tsx index 062c01eef..a3d1ca05f 100644 --- a/pages/tournament.tsx +++ b/pages/tournament.tsx @@ -6,6 +6,33 @@ import styles from 'styles/tournament/TournamentContainer.module.scss'; // 내부의 토너먼트 보여주는 부분만 Component화 하면될까? 다른곳에서도 쓰일까? // 진행중인 토너먼트의 Bracket을 보여주는 부분도 다른곳에서도 쓸수있지않나? +const tempData = { + tournaments: [ + { + tournametId: 5, + title: '5회 루키 토너먼트', + contents: '블라블라', + startDate: '2023-11-11', + status: '종료', + type: 'rookie', + winnerId: 'hannkim', + winnerImage: '', + endDate: '2023-11-11', + }, + { + tournametId: 6, + title: '6회 마스터 토너먼트', + contents: '블라블라 하이하이', + startDate: '2023-11-12', + status: '진행중', + type: 'master', + winnerId: 'hannkim', + winnerImage: '', + endDate: '2023-11-12', + }, + ], + totalPage: 100, +}; export default function Tournament() { const setModal = useSetRecoilState(modalState); @@ -26,8 +53,9 @@ export default function Tournament() {
대기중인 토너먼트
- - + {tempData.tournaments.map((tournament, index) => ( + + ))} From a55629d8557139a28c8a2c53aaf7c1a574042a7d Mon Sep 17 00:00:00 2001 From: Junho Jeon Date: Wed, 8 Nov 2023 18:42:57 +0900 Subject: [PATCH 10/14] =?UTF-8?q?[Stylle]=20=EB=8C=80=EA=B8=B0=EC=A4=91?= =?UTF-8?q?=EC=9D=B8=20=ED=86=A0=EB=84=88=EB=A8=BC=ED=8A=B8=20css=20?= =?UTF-8?q?=EC=88=98=EC=A0=95#1073?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- styles/tournament/TournamentContainer.module.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles/tournament/TournamentContainer.module.scss b/styles/tournament/TournamentContainer.module.scss index 734aa32bd..6adb9e781 100644 --- a/styles/tournament/TournamentContainer.module.scss +++ b/styles/tournament/TournamentContainer.module.scss @@ -27,7 +27,7 @@ flex-direction: column; justify-content: center; align-items: center; - padding: 2rem 1rem 0; + padding: 3rem 1rem 0; overflow-x: hidden; overflow-y: scroll; background: rgba(112, 0, 255, 0.17); From 98d7c7f91ebc985ee3992ee9f311170108916edc Mon Sep 17 00:00:00 2001 From: Junho Jeon Date: Wed, 8 Nov 2023 19:07:08 +0900 Subject: [PATCH 11/14] =?UTF-8?q?[FIX]=20=20=ED=86=A0=EB=84=88=EB=A8=BC?= =?UTF-8?q?=ED=8A=B8=20=EB=AA=A8=EB=8B=AC=EC=97=90=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EB=90=98=EB=8A=94=20=EC=9D=B8=ED=84=B0=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=8A=A4=20=EB=A9=A4=EB=B2=84=20=20=EB=84=A4=EC=9D=B4=EB=B0=8D?= =?UTF-8?q?=EC=9D=84=20API=EC=97=90=EC=84=9C=20=EC=82=AC=EC=9A=A9=EB=90=98?= =?UTF-8?q?=EB=8A=94=20=EC=9D=B4=EB=A6=84=EC=9C=BC=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20#1073?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modal/modalType/TournamentModal.tsx | 4 ++- .../tournament/TournamentRegistryModal.tsx | 36 ++++++++++++++----- types/modalTypes.ts | 11 ++++-- 3 files changed, 38 insertions(+), 13 deletions(-) diff --git a/components/modal/modalType/TournamentModal.tsx b/components/modal/modalType/TournamentModal.tsx index de2ff0a44..aea7d3053 100644 --- a/components/modal/modalType/TournamentModal.tsx +++ b/components/modal/modalType/TournamentModal.tsx @@ -6,7 +6,9 @@ export default function TournamentModal() { const { modalName, tournamentInfo } = useRecoilValue(modalState); const content: { [key: string]: JSX.Element | null } = { - 'TOURNAMENT-REGISTRY': , + 'TOURNAMENT-REGISTRY': tournamentInfo ? ( + + ) : null, }; if (!modalName) return null; diff --git a/components/modal/tournament/TournamentRegistryModal.tsx b/components/modal/tournament/TournamentRegistryModal.tsx index 8b4b29aff..b6bf5b652 100644 --- a/components/modal/tournament/TournamentRegistryModal.tsx +++ b/components/modal/tournament/TournamentRegistryModal.tsx @@ -16,9 +16,14 @@ const Quill = dynamic(() => import('react-quill'), { }); export default function TournamentRegistryModal({ - tournamentDate, - tournamentDiscription, - tournamentName, + title, + contents, + startDate, + status, + type, + winnerId, + winnerImage, + endDate, }: TournamentInfo) { const setModal = useSetRecoilState(modalState); @@ -32,18 +37,31 @@ export default function TournamentRegistryModal({ return (
-
{tournamentName}
-
{tournamentDate}
+
{title}
+
{startDate}
- - - +
+ + + + + + +
); } diff --git a/types/modalTypes.ts b/types/modalTypes.ts index 0fc099149..4ed8495f5 100644 --- a/types/modalTypes.ts +++ b/types/modalTypes.ts @@ -93,9 +93,14 @@ export interface Manual { } export interface TournamentInfo { - tournamentName?: string; - tournamentDiscription?: string; - tournamentDate?: string; + title: string; + contents: string; + startDate: string; + status: string; + type: string; + winnerId: string; + winnerImage?: string | null; + endDate: string; } export interface PriceTag { From 03d23cb5149a5b5ebcbc2ee04959d3b64c7e0b92 Mon Sep 17 00:00:00 2001 From: Junho Jeon Date: Thu, 9 Nov 2023 14:42:16 +0900 Subject: [PATCH 12/14] =?UTF-8?q?[FIX]=20=ED=86=A0=EB=84=88=EB=A8=BC?= =?UTF-8?q?=ED=8A=B8=20Card=EC=9D=98=20Props=EB=93=A4=EC=9D=84=20API?= =?UTF-8?q?=EC=97=90=20=EB=A7=9E=EC=B6=B0=EC=84=9C=20=EB=B3=80=EA=B2=BD#10?= =?UTF-8?q?73?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/tournament/TournamentCard.tsx | 14 ++++++++++++-- pages/tournament.tsx | 17 ++++++++++------- types/modalTypes.ts | 1 + 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/components/tournament/TournamentCard.tsx b/components/tournament/TournamentCard.tsx index d931d5113..5af6c76e3 100644 --- a/components/tournament/TournamentCard.tsx +++ b/components/tournament/TournamentCard.tsx @@ -1,10 +1,20 @@ import { TournamentInfo } from 'types/modalTypes'; import styles from 'styles/tournament/TournamentCard.module.scss'; -export default function TournamentCard({ tournamentName }: TournamentInfo) { +export default function TournamentCard({ + tournametId, + title, + contents, + startDate, + status, + type, + winnerId, + winnerImage, + endDate, +}: TournamentInfo) { return (
-
{tournamentName}
+
{title}
); } diff --git a/pages/tournament.tsx b/pages/tournament.tsx index a3d1ca05f..5626b6070 100644 --- a/pages/tournament.tsx +++ b/pages/tournament.tsx @@ -41,9 +41,15 @@ export default function Tournament() { setModal({ modalName: 'TOURNAMENT-REGISTRY', tournamentInfo: { - tournamentName: '제1회 루키토너먼트', - tournamentDiscription: '첫번재 루키 토너먼트 대회입니다 ! ', - tournamentDate: '2023:12:12:24:00', + tournametId: 5, + title: '5회 루키 토너먼트', + contents: '블라블라', + startDate: '2023-11-11', + status: '종료', + type: 'rookie', + winnerId: 'hannkim', + winnerImage: '', + endDate: '2023-11-11', }, }); }; @@ -54,11 +60,8 @@ export default function Tournament() {
대기중인 토너먼트
{tempData.tournaments.map((tournament, index) => ( - + ))} - - -
진행중인 토너먼트
diff --git a/types/modalTypes.ts b/types/modalTypes.ts index 4ed8495f5..b03d0fcdd 100644 --- a/types/modalTypes.ts +++ b/types/modalTypes.ts @@ -93,6 +93,7 @@ export interface Manual { } export interface TournamentInfo { + tournametId: number; title: string; contents: string; startDate: string; From 41df08663280bfc104211cca376c61a35a7eaf00 Mon Sep 17 00:00:00 2001 From: Junho Jeon Date: Thu, 9 Nov 2023 17:50:10 +0900 Subject: [PATCH 13/14] =?UTF-8?q?[FIX]=20ismainn=EC=97=90=20=EB=94=B0?= =?UTF-8?q?=EB=9D=BC=EC=84=9C=20bangContainer=EC=9D=98=20=EB=B3=80?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/rank/topRank/RankListMain.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/rank/topRank/RankListMain.tsx b/components/rank/topRank/RankListMain.tsx index 2d5f8f8e7..4b3160d7d 100644 --- a/components/rank/topRank/RankListMain.tsx +++ b/components/rank/topRank/RankListMain.tsx @@ -53,8 +53,10 @@ export default function RankListMain({ isMain, season }: RankListMainProps) { )); return ( -
-
{bangElements}
+ <> + {!isMain && ( +
{bangElements}
+ )}
{rank !== undefined && rank.map((item: userImages, index: number) => ( @@ -65,7 +67,7 @@ export default function RankListMain({ isMain, season }: RankListMainProps) { /> ))}
-
+ ); } From 9222cee06874f6e96fcea3b16f41c1e42dbfc508 Mon Sep 17 00:00:00 2001 From: Junho Jeon Date: Thu, 9 Nov 2023 17:50:49 +0900 Subject: [PATCH 14/14] =?UTF-8?q?[Style]=20=20=EB=9E=AD=ED=82=B9=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20margin=EB=B3=80=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- styles/rank/RankListMain.module.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/styles/rank/RankListMain.module.scss b/styles/rank/RankListMain.module.scss index de092ecaa..161f037ed 100644 --- a/styles/rank/RankListMain.module.scss +++ b/styles/rank/RankListMain.module.scss @@ -15,7 +15,6 @@ align-items: end; &.isMain { height: 15.5rem; - margin-top: 7.5rem; } }