From ac570f0dfaf50d4a11cf72aab02b5e792ef61e27 Mon Sep 17 00:00:00 2001 From: SNXWXH Date: Wed, 31 Jul 2024 15:20:44 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=94=A7=20Modify:=20daily=5Frank.json?= =?UTF-8?q?=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/data/daily_rank.json | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/public/data/daily_rank.json b/public/data/daily_rank.json index 43f45bb..11a2fad 100644 --- a/public/data/daily_rank.json +++ b/public/data/daily_rank.json @@ -531,9 +531,9 @@ { "rank": 2, "team": "LG" }, { "rank": 3, "team": "삼성" }, { "rank": 4, "team": "두산" }, - { "rank": 5, "team": "SSG" }, - { "rank": 6, "team": "NC" }, - { "rank": 7, "team": "KT" }, + { "rank": 5, "team": "KT" }, + { "rank": 5, "team": "NC" }, + { "rank": 7, "team": "SSG" }, { "rank": 8, "team": "롯데" }, { "rank": 9, "team": "한화" }, { "rank": 10, "team": "키움" } @@ -583,5 +583,35 @@ { "rank": 9, "team": "한화" }, { "rank": 10, "team": "키움" } ] + }, + { + "day": 20240729, + "data": [ + { "rank": 1, "team": "KIA" }, + { "rank": 2, "team": "LG" }, + { "rank": 3, "team": "삼성" }, + { "rank": 4, "team": "KT" }, + { "rank": 4, "team": "SSG" }, + { "rank": 6, "team": "두산" }, + { "rank": 7, "team": "NC" }, + { "rank": 8, "team": "롯데" }, + { "rank": 9, "team": "한화" }, + { "rank": 10, "team": "키움" } + ] + }, + { + "day": 20240730, + "data": [ + { "rank": 1, "team": "KIA" }, + { "rank": 2, "team": "LG" }, + { "rank": 3, "team": "삼성" }, + { "rank": 4, "team": "SSG" }, + { "rank": 5, "team": "두산" }, + { "rank": 6, "team": "KT" }, + { "rank": 7, "team": "NC" }, + { "rank": 8, "team": "한화" }, + { "rank": 9, "team": "롯데" }, + { "rank": 10, "team": "키움" } + ] } ] From d6da6f1dbad721a48825f63e181d7e4690256939 Mon Sep 17 00:00:00 2001 From: yheseul Date: Thu, 1 Aug 2024 02:32:34 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=A4=96=20Refactor:=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EB=A6=AC=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(main)/@result/(.)testResultModal/page.tsx | 2 +- src/app/(test)/test/result/page.tsx | 2 +- src/components/test/result/CaptureArea.tsx | 14 ++++++++++---- src/components/test/result/UrlCopy.tsx | 4 +--- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/app/(main)/@result/(.)testResultModal/page.tsx b/src/app/(main)/@result/(.)testResultModal/page.tsx index 51d64c4..5a7782a 100644 --- a/src/app/(main)/@result/(.)testResultModal/page.tsx +++ b/src/app/(main)/@result/(.)testResultModal/page.tsx @@ -90,7 +90,7 @@ const Page: React.FC = () => { })}
-
diff --git a/src/app/(test)/test/result/page.tsx b/src/app/(test)/test/result/page.tsx index 4aff0f0..a76f31a 100644 --- a/src/app/(test)/test/result/page.tsx +++ b/src/app/(test)/test/result/page.tsx @@ -60,7 +60,7 @@ const Page: React.FC = () => { })}
-
diff --git a/src/components/test/result/CaptureArea.tsx b/src/components/test/result/CaptureArea.tsx index 75d7de1..0bb94c9 100644 --- a/src/components/test/result/CaptureArea.tsx +++ b/src/components/test/result/CaptureArea.tsx @@ -30,30 +30,36 @@ const CaptureArea = forwardRef( const selectRandomPlayer = (position: string) => { let playerData: any[]; + let playerPath: string; + switch (position) { case '포수': playerData = catcherData.data.list; + playerPath = '/player/batter/catcher/'; break; case '내야수': playerData = infielderData.data.list; + playerPath = '/player/batter/infielder/'; break; case '외야수': playerData = outfielderData.data.list; + playerPath = '/player/batter/outfielder/'; break; case '투수': playerData = pitcherData.data.list; + playerPath = '/player/pitcher/'; break; default: playerData = []; + playerPath = ''; } const randomPlayer = playerData[Math.floor(Math.random() * playerData.length)]; setPlayer(randomPlayer); - if (onPlayerHrefChange) { - onPlayerHrefChange( - `/player/batter/catcher/${randomPlayer.backNum}`, - ); + + if (onPlayerHrefChange && playerPath) { + onPlayerHrefChange(`${playerPath}${randomPlayer.backNum}`); } }; diff --git a/src/components/test/result/UrlCopy.tsx b/src/components/test/result/UrlCopy.tsx index b9b5fdf..dde362a 100644 --- a/src/components/test/result/UrlCopy.tsx +++ b/src/components/test/result/UrlCopy.tsx @@ -1,9 +1,7 @@ 'use client'; export default function UrlCopy() { - const testUrl: string = `${process.env.BASE_URL}/test`; - // testUrl.select(); - // testUrl.setSelectionRange(0, 99999); + const testUrl: string = 'http://localhost:3000/test'; navigator.clipboard.writeText(testUrl); alert('링크가 복사 되었습니다.'); From e0da9f4be241cf691c7bb14a1214939e060b788a Mon Sep 17 00:00:00 2001 From: yheseul Date: Thu, 1 Aug 2024 13:24:35 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=A4=96=20Refactor:=20url=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/test/result/UrlCopy.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/test/result/UrlCopy.tsx b/src/components/test/result/UrlCopy.tsx index dde362a..ca5569d 100644 --- a/src/components/test/result/UrlCopy.tsx +++ b/src/components/test/result/UrlCopy.tsx @@ -1,7 +1,5 @@ -'use client'; - export default function UrlCopy() { - const testUrl: string = 'http://localhost:3000/test'; + const testUrl: string = `${process.env.BASE_URL}/test`; navigator.clipboard.writeText(testUrl); alert('링크가 복사 되었습니다.'); From 966b42e61bfaa6da3789979c0e088cf64ce953fa Mon Sep 17 00:00:00 2001 From: mj Date: Thu, 1 Aug 2024 13:41:41 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=92=84=20Design:=20=ED=91=9C=20?= =?UTF-8?q?=EA=B8=80=EC=9E=90=20=EA=B0=80=EC=9A=B4=EB=8D=B0=20=EC=A0=95?= =?UTF-8?q?=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/player/PlayerData.tsx | 58 ++++++++++++++-------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/components/player/PlayerData.tsx b/src/components/player/PlayerData.tsx index 7e68be4..55e4488 100644 --- a/src/components/player/PlayerData.tsx +++ b/src/components/player/PlayerData.tsx @@ -75,7 +75,7 @@ export default function PlayerData({ player }: PlayerData) {

2024 시즌 정규리그 기록

- +
{Object.keys(!playerSeason) @@ -86,7 +86,7 @@ export default function PlayerData({ player }: PlayerData) { .map((key, index) => (
{key === 'innDisplay' ? '이닝' @@ -107,7 +107,7 @@ export default function PlayerData({ player }: PlayerData) { .map(([key, value], valueIndex) => (
{key}
{value}
@@ -121,13 +121,13 @@ export default function PlayerData({ player }: PlayerData) { {playerRecentRecord && playerRecentRecord.length > 0 && ( <>

최근 5경기 기록

- +
- - {Object.keys(playerRecentRecord[0]) @@ -140,7 +140,7 @@ export default function PlayerData({ player }: PlayerData) { .map((key, index) => ( - {Object.entries(record) @@ -171,7 +171,7 @@ export default function PlayerData({ player }: PlayerData) { .map(([key, value], valueIndex) => (
+ 날짜 + 상대 팀 {key === 'innDisplay' ? '이닝' @@ -155,10 +155,10 @@ export default function PlayerData({ player }: PlayerData) { key={recordIndex} className="bg-gray-100 border border-gray-300 md:border-none block md:table-row" > - + {record.displayDate} + {record.matchTeamName} {' '}
{key}
@@ -190,13 +190,13 @@ export default function PlayerData({ player }: PlayerData) { {playerYearRecord && playerYearRecord.length > 0 && ( <>

kt wiz 통산 기록

- +
- - {Object.keys(playerYearRecord[0]) @@ -210,7 +210,7 @@ export default function PlayerData({ player }: PlayerData) { .map((key, index) => ( - {Object.entries(record) @@ -242,7 +242,7 @@ export default function PlayerData({ player }: PlayerData) { .map(([key, value], valueIndex) => (
+ 연도 + 경기 {key === 'innDisplay' ? '이닝' @@ -225,10 +225,10 @@ export default function PlayerData({ player }: PlayerData) { key={recordIndex} className="bg-gray-100 border border-gray-300 md:border-none block md:table-row" > - + {record.gyear} + {record.gamenum} {' '}
{key}
@@ -264,7 +264,7 @@ export default function PlayerData({ player }: PlayerData) {

2024 시즌 퓨처스리그 기록

- +
{Object.keys(!playerSeasonFutures) @@ -275,7 +275,7 @@ export default function PlayerData({ player }: PlayerData) { .map((key, index) => (
{key === 'innDisplay' ? '이닝' @@ -296,7 +296,7 @@ export default function PlayerData({ player }: PlayerData) { .map(([key, value], valueIndex) => (
{key}
{value}
@@ -314,13 +314,13 @@ export default function PlayerData({ player }: PlayerData) {

퓨처스리그 최근 5경기 기록

- - - -
+ + + + - {Object.keys(playerRecentFuturesRecord[0]) @@ -333,7 +333,7 @@ export default function PlayerData({ player }: PlayerData) { .map((key, index) => ( - {Object.entries(record) @@ -365,7 +365,7 @@ export default function PlayerData({ player }: PlayerData) { .map(([key, value], valueIndex) => (
날짜 + 상대 팀 {key === 'innDisplay' ? '이닝' @@ -349,10 +349,10 @@ export default function PlayerData({ player }: PlayerData) { key={recordIndex} className="bg-gray-100 border border-gray-300 md:border-none block md:table-row" > - + {record.displayDate} + {record.matchTeamName}
{key}
{typeof value === 'object' From b0c2bdb52fae9c2028442f38a66bd743c207559f Mon Sep 17 00:00:00 2001 From: SNXWXH Date: Thu, 1 Aug 2024 13:48:08 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=92=84=20Design:=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=EC=97=90=20no-scroll=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/data/daily_rank.json | 45 +++++++++++++++++++ .../(main)/player/batter/outfielder/page.tsx | 2 +- .../cheerleader/[cheerleaderId]/page.tsx | 7 --- src/app/(main)/player/cheerleader/layout.tsx | 19 -------- src/app/(main)/player/cheerleader/page.tsx | 7 --- .../(main)/player/coach/[coachId]/page.tsx | 7 --- src/app/(main)/player/coach/layout.tsx | 19 -------- src/app/(main)/player/coach/page.tsx | 7 --- src/app/(main)/ranking/ai/page.tsx | 2 +- src/app/(main)/ranking/daily/page.tsx | 2 +- src/app/(main)/ranking/year/page.tsx | 2 +- src/components/player/PlayerDetail.tsx | 2 +- 12 files changed, 50 insertions(+), 71 deletions(-) delete mode 100644 src/app/(main)/player/cheerleader/[cheerleaderId]/page.tsx delete mode 100644 src/app/(main)/player/cheerleader/layout.tsx delete mode 100644 src/app/(main)/player/cheerleader/page.tsx delete mode 100644 src/app/(main)/player/coach/[coachId]/page.tsx delete mode 100644 src/app/(main)/player/coach/layout.tsx delete mode 100644 src/app/(main)/player/coach/page.tsx diff --git a/public/data/daily_rank.json b/public/data/daily_rank.json index 11a2fad..5a9c8e9 100644 --- a/public/data/daily_rank.json +++ b/public/data/daily_rank.json @@ -613,5 +613,50 @@ { "rank": 9, "team": "롯데" }, { "rank": 10, "team": "키움" } ] + }, + { + "day": 20240731, + "data": [ + { "rank": 1, "team": "KIA" }, + { "rank": 2, "team": "LG" }, + { "rank": 3, "team": "삼성" }, + { "rank": 4, "team": "SSG" }, + { "rank": 5, "team": "두산" }, + { "rank": 6, "team": "KT" }, + { "rank": 7, "team": "NC" }, + { "rank": 8, "team": "한화" }, + { "rank": 9, "team": "롯데" }, + { "rank": 10, "team": "키움" } + ] + }, + { + "day": 20240801, + "data": [ + { "rank": 1, "team": "KIA" }, + { "rank": 2, "team": "LG" }, + { "rank": 3, "team": "삼성" }, + { "rank": 4, "team": "SSG" }, + { "rank": 5, "team": "두산" }, + { "rank": 6, "team": "KT" }, + { "rank": 7, "team": "NC" }, + { "rank": 8, "team": "한화" }, + { "rank": 9, "team": "롯데" }, + { "rank": 10, "team": "키움" } + ] + }, + { + "day": 20240802, + "data": [ + { "rank": 1, "team": "KIA" }, + { "rank": 2, "team": "LG" }, + { "rank": 3, "team": "삼성" }, + { "rank": 4, "team": "SSG" }, + { "rank": 5, "team": "두산" }, + { "rank": 6, "team": "KT" }, + { "rank": 7, "team": "NC" }, + { "rank": 8, "team": "한화" }, + { "rank": 9, "team": "롯데" }, + { "rank": 10, "team": "키움" } + ] } ] diff --git a/src/app/(main)/player/batter/outfielder/page.tsx b/src/app/(main)/player/batter/outfielder/page.tsx index 3fbf9c5..c8778a8 100644 --- a/src/app/(main)/player/batter/outfielder/page.tsx +++ b/src/app/(main)/player/batter/outfielder/page.tsx @@ -14,7 +14,7 @@ export default function Outfielder() { }; return ( <> -
+
{outfielderData.map((outfielder, index) => (
diff --git a/src/app/(main)/player/cheerleader/[cheerleaderId]/page.tsx b/src/app/(main)/player/cheerleader/[cheerleaderId]/page.tsx deleted file mode 100644 index 2419c0d..0000000 --- a/src/app/(main)/player/cheerleader/[cheerleaderId]/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function CheerleaderDetail() { - return ( - <> -

CheerleaderDetail Component

- - ); -} diff --git a/src/app/(main)/player/cheerleader/layout.tsx b/src/app/(main)/player/cheerleader/layout.tsx deleted file mode 100644 index 2b74d22..0000000 --- a/src/app/(main)/player/cheerleader/layout.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import Banner from '@/components/player/Banner'; - -export default function BatterLayout({ - children, -}: { - children: React.ReactNode; -}) { - return ( - <> -
- {' '} -
- -
- {children} -
- - ); -} diff --git a/src/app/(main)/player/cheerleader/page.tsx b/src/app/(main)/player/cheerleader/page.tsx deleted file mode 100644 index 2947904..0000000 --- a/src/app/(main)/player/cheerleader/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function CheerleaderMain() { - return ( - <> -

CheerleaderMain Component

- - ); -} diff --git a/src/app/(main)/player/coach/[coachId]/page.tsx b/src/app/(main)/player/coach/[coachId]/page.tsx deleted file mode 100644 index 6e1907e..0000000 --- a/src/app/(main)/player/coach/[coachId]/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function CoachDetail() { - return ( - <> -

CoachDetail Component

- - ); -} diff --git a/src/app/(main)/player/coach/layout.tsx b/src/app/(main)/player/coach/layout.tsx deleted file mode 100644 index 08d5058..0000000 --- a/src/app/(main)/player/coach/layout.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import Banner from '@/components/player/Banner'; - -export default function CoachLayout({ - children, -}: { - children: React.ReactNode; -}) { - return ( - <> -
- {' '} -
- -
- {children} -
- - ); -} diff --git a/src/app/(main)/player/coach/page.tsx b/src/app/(main)/player/coach/page.tsx deleted file mode 100644 index 33aa875..0000000 --- a/src/app/(main)/player/coach/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function CoachMain() { - return ( - <> -

CoachMain Component

- - ); -} diff --git a/src/app/(main)/ranking/ai/page.tsx b/src/app/(main)/ranking/ai/page.tsx index 5c46cf7..37a311e 100644 --- a/src/app/(main)/ranking/ai/page.tsx +++ b/src/app/(main)/ranking/ai/page.tsx @@ -83,7 +83,7 @@ export default async function RankingAi() { return ( <> -
+
{dayOfWeek === 1 || !todayGame ? (
diff --git a/src/app/(main)/ranking/daily/page.tsx b/src/app/(main)/ranking/daily/page.tsx index 4bfb273..4631286 100644 --- a/src/app/(main)/ranking/daily/page.tsx +++ b/src/app/(main)/ranking/daily/page.tsx @@ -19,7 +19,7 @@ export default function RankingDaily() { return ( <> -
+

비교 분석 구간:

diff --git a/src/app/(main)/ranking/year/page.tsx b/src/app/(main)/ranking/year/page.tsx index f11ed96..7c13293 100644 --- a/src/app/(main)/ranking/year/page.tsx +++ b/src/app/(main)/ranking/year/page.tsx @@ -7,7 +7,7 @@ export default function RankingYear() { return ( <> -
+
diff --git a/src/components/player/PlayerDetail.tsx b/src/components/player/PlayerDetail.tsx index d6ae047..ceb0c4d 100644 --- a/src/components/player/PlayerDetail.tsx +++ b/src/components/player/PlayerDetail.tsx @@ -50,7 +50,7 @@ export default function PlayerDetailClient({ return ( <> -
+