Skip to content
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

Dev -> main 배포 #56

Merged
merged 62 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
ff72752
♻️ WV-42 refactor : 중복된 타입 정리
hayoung78 Jan 10, 2025
0e2aac5
➕ WV-42 : pitcherDetail api 함수 생성
hayoung78 Jan 13, 2025
aa13f56
♻️ WV-42 refactor : playerCard에 pathname props 추가
hayoung78 Jan 13, 2025
5249c1b
➕ WV-42 feat : pitcherDetail page연결
hayoung78 Jan 13, 2025
c395e60
♻️ WV-42 refactor : 폴더구조 변경
hayoung78 Jan 13, 2025
d0eafbb
➕ WV-42 feat : pitcher detail 컴포넌트 생성
hayoung78 Jan 13, 2025
74ef8a2
💄[WV-44] design : create-bi-page 추가
naelumcat Jan 13, 2025
a73bd4b
♻️ WV-40 refactor : api 이름 수정
hee2323 Jan 14, 2025
2085ce3
➕ WV-45 feat : news-detail page 생성중
hayoung78 Jan 15, 2025
42ac9b0
➕ WV-45 feat : news-detail api 함수 생성
hayoung78 Jan 16, 2025
516fd7d
🔧 WV-46 fix : 카카오SDK 경로 https로 변경
Jinviz Jan 16, 2025
e17dd06
♻️ WV-44 refactor : iframe 불필요한 속성 제거
naelumcat Jan 16, 2025
be33f3e
🔧 WV-46 fix : 백엔드 요청 프록시 URL로 설정
Jinviz Jan 16, 2025
c1b9c18
🔧 WV-37 fix : 카카오맵 로드 문제 해결
Jinviz Jan 16, 2025
111ed49
➕ WV-45 feat : news-detail page 생성
hayoung78 Jan 16, 2025
884f8ed
➕ WV-45 feat : news-detail page 생성
hayoung78 Jan 16, 2025
e050a73
🔧 WV-37 fix : body 태그 안으로 스크립트 로드 위치
Jinviz Jan 16, 2025
12a0b3d
💄[WV-43] design : create-wallpaper-page 추가
naelumcat Jan 16, 2025
50b27d7
💄 WV-40 design : 메인 페이지 배너 이미지 추가
hee2323 Jan 16, 2025
20c2cb5
💄 WV-40 design : 기존 대체하던 캡처 이미지 제거
hee2323 Jan 16, 2025
a32c550
♻️ WV-40 refactor : api 호출하는 react query 작성 시 queryparams로 묶어서 관심사 분리
hee2323 Jan 16, 2025
0a7ef0a
+ WV-40 feat : 경기 일정, 랭킹 배너 스켈레톤 생성
hee2323 Jan 16, 2025
223cfa3
+ WV-40 feat : 팀 랭킹, 주차 예약 배너 생성
hee2323 Jan 16, 2025
c46da47
+ WV-40 feat : 팀 랭킹 api & type 추가
hee2323 Jan 16, 2025
2d76428
🔧 WV-46 fix : API 환경 변수에 맞추어 경로 수정
Jinviz Jan 16, 2025
e068707
♻️ WV-40 refactor : boxscore api 호출 시 기본 queryParams값 추가
hee2323 Jan 16, 2025
a7d8613
♻️ WV-40 refactor : 경기 일정 boxscore api 적용, 팀 랭킹, 주차 예약 배너 컴포넌트 적용
hee2323 Jan 16, 2025
d5dc907
🔥 WV-40 remove : 경기일정 상수값 제거
hee2323 Jan 16, 2025
817fca5
♻️ WV-40 refactor : 비디오 페이지 없어짐에 따라 불필요한 버튼 제거
hee2323 Jan 16, 2025
25e502c
♻️ WV-40 refactor : 갤러리 하단 스토어 배너, 이달의 선수 배너 클릭 시 페이지 이동
hee2323 Jan 16, 2025
ef79bad
Merge branch 'dev' of github.com:KTwizviz/wizviz into WV-40-main-page…
hee2323 Jan 16, 2025
f34dfd6
💄WV-43 design : 이미지 변경
naelumcat Jan 16, 2025
ee80ad9
🔧 WV-46 fix : 엔드포인트 수정
Jinviz Jan 16, 2025
52b6138
🔧 WV-46 fix : http를 config에 추가
Jinviz Jan 16, 2025
f75e305
Merge pull request #49 from KTwizviz/WV-45-create-news-detail-page
hayoung78 Jan 16, 2025
f3cd88a
Merge pull request #48 from KTwizviz/WV-42--create-pitcher-detail-page
hayoung78 Jan 16, 2025
7ea3fa1
Merge pull request #50 from KTwizviz/WV-37-fix-kakaomap
hayoung78 Jan 16, 2025
759c618
Merge branch 'dev' into WV-46-fix-mixed-content-error
Jinviz Jan 16, 2025
536053c
Merge pull request #52 from KTwizviz/WV-46-fix-mixed-content-error
Jinviz Jan 16, 2025
cc5b3b7
🔧 WV-46 fix : fix: fetch 엔드포인트 수정
Jinviz Jan 16, 2025
64dfd2e
💄WV-43 design : 이미지 round 처리
naelumcat Jan 16, 2025
8f8299d
Merge branch 'dev' of github.com:KTwizviz/wizviz into WV-40-main-page…
hee2323 Jan 16, 2025
b4aa61b
Merge pull request #54 from KTwizviz/WV-46-fix-mixed-content-error
hee2323 Jan 16, 2025
7b45329
Merge branch 'dev' of github.com:KTwizviz/wizviz into WV-40-main-page…
hee2323 Jan 16, 2025
d5a7f1d
🔧 WV-46 fix : useEffect 의존성 경고 해결
Jinviz Jan 16, 2025
cb25501
Merge branch 'dev' of https://github.com/KTwizviz/wizviz into WV-43-c…
naelumcat Jan 16, 2025
a2371cd
Merge pull request #51 from KTwizviz/WV-43-create-wallpaper-page
naelumcat Jan 16, 2025
49774b7
♻️ WV-40 refactor : 팀 랭킹 api 엔드포인트 수정
hee2323 Jan 16, 2025
578d12e
Merge branch 'dev' of github.com:KTwizviz/wizviz into WV-40-main-page…
hee2323 Jan 16, 2025
ce11446
💄WV-40 design : main 색상 사용
hee2323 Jan 16, 2025
cbce68a
Merge pull request #53 from KTwizviz/WV-40-main-page-refactor
hee2323 Jan 16, 2025
afadccd
Merge pull request #55 from KTwizviz/WV-46-fix-mixed-content-error
Jinviz Jan 16, 2025
644f037
💄WV-44 design : 머지 후 커밋밋
naelumcat Jan 16, 2025
f678da2
♻️ WV-44 refactor : 디자인 변경 및 파일분리
naelumcat Jan 16, 2025
2e7fb9b
Merge branch 'dev' into WV-44-create-bi-page
Jinviz Jan 16, 2025
9db8864
♻️ WV-42 refactor : api 수정
hayoung78 Jan 16, 2025
74f3270
♻️ WV-42 refactor : api 수정
hayoung78 Jan 16, 2025
602dad8
Merge pull request #58 from KTwizviz/WV-42--create-pitcher-detail-page
hayoung78 Jan 16, 2025
0e937d2
✏️ WV-44 rename : 파일이름 변경
naelumcat Jan 16, 2025
208dca0
Merge branch 'WV-44-create-bi-page' of https://github.com/KTwizviz/wi…
naelumcat Jan 16, 2025
5485bad
✏️ WV-44 rename : 경로이름 변경
naelumcat Jan 16, 2025
0dfe91a
Merge pull request #57 from KTwizviz/WV-44-create-bi-page
naelumcat Jan 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions api/game/apis.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
const BASE_URL = process.env.NEXT_PUBLIC_API_KEY;

export async function getMonthSchedules(params: string) {
try {
const res = await fetch(
`${BASE_URL}/game/monthschedule?yearMonth=${params}`
);
const res = await fetch(`/api/game/monthschedule?yearMonth=${params}`);

if (!res.ok) {
throw new Error("네트워크 문제 발생");
Expand All @@ -20,9 +16,7 @@ export async function getMonthSchedules(params: string) {

export async function getAllSchedules(params: string) {
try {
const res = await fetch(
`${BASE_URL}/game/allgameschedule?yearMonth=${params}`
);
const res = await fetch(`/api/game/allgameschedule?yearMonth=${params}`);

if (!res.ok) {
throw new Error("네트워크 문제 발생");
Expand All @@ -36,12 +30,11 @@ export async function getAllSchedules(params: string) {
}
}

export const fetchBoxscore = async (gameDate?: number, gmkey?: string) => {
export const getBoxscore = async (
queryparams: string
): Promise<GetBoxscore> => {
try {
const queryparams =
gameDate && gmkey ? `?gameDate=${gameDate}&gmkey=${gmkey}` : "";

const URL = `${BASE_URL}/game/boxscore${queryparams}`;
const URL = `/api/game/boxscore${queryparams}`;

const response = await fetch(URL);

Expand Down
15 changes: 15 additions & 0 deletions api/main/apis.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export const getKtwizRank = async (): Promise<GetKtwizRank> => {
try {
const response = await fetch("/api/game/ktwizteamrank");

if (!response.ok) {
throw new Error("Network response was not ok");
}

const result = await response.json();
return result.data.ktWizTeamRank;
} catch (error) {
console.error("API 요청 에러:", error);
throw error;
}
};
16 changes: 16 additions & 0 deletions api/news/apis.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// news-detail
export const getNewsDetail = async (
artcSeq: string
): Promise<ArticleContentsResponse["data"]> => {
const queryparam = artcSeq ? `newsdetail?artcSeq=${artcSeq}` : "";

const url = `/api/article/${queryparam}`;
const res = await fetch(url);

if (!res.ok) {
throw new Error("Failed to fetch news detail");
}

const response: ArticleContentsResponse = await res.json();
return response.data;
};
5 changes: 5 additions & 0 deletions api/news/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type ArticleContentsResponse = {
data: {
article: ArticleContentsType;
};
};
31 changes: 25 additions & 6 deletions api/player/apis.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { CoachDetailResponse, CoachResponse, PitcherResponse } from "./types";

const BASE_URL = process.env.NEXT_PUBLIC_API_KEY;
import {
CoachDetailResponse,
CoachResponse,
PitcherDetailResponse,
PitcherResponse,
} from "./types";

// player - 코치 리스트
export const getCoachList = async (): Promise<CoachInfo[]> => {
const url = `${BASE_URL}/player/coachlist`;
const url = `/api/player/coachlist`;
const res = await fetch(url);

if (!res.ok) {
Expand All @@ -17,7 +20,7 @@ export const getCoachList = async (): Promise<CoachInfo[]> => {

// player - 투수 리스트
export const getPitcherList = async (): Promise<PitcherInfo[]> => {
const url = `${BASE_URL}/player/pitcherlist`;
const url = `/api/player/pitcherlist`;
const res = await fetch(url, { method: "GET" });
if (!res.ok) {
throw new Error("Failed to fetch coach list");
Expand All @@ -32,7 +35,7 @@ export const getCoachDetail = async (
pcode: string
): Promise<CoachDetailResponse["data"]> => {
const queryparam = pcode ? `coachdetail?pcode=${pcode}` : "";
const url = `${BASE_URL}/player/${queryparam}`;
const url = `/api/player/${queryparam}`;
const response = await fetch(url, { method: "GET" });

if (!response.ok) {
Expand All @@ -42,3 +45,19 @@ export const getCoachDetail = async (
const data = await response.json();
return data.data;
};

// player - 투수 디테일
export const getPitcherDetail = async (
pcode: string
): Promise<PitcherDetailResponse["data"]> => {
const queryparam = pcode ? `pitcherdetail?pcode=${pcode}` : "";
const url = `/api/player/${queryparam}`;
const response = await fetch(url, { method: "GET" });

if (!response.ok) {
throw new Error("투수의 디테일한 정보를 가져올수 없음");
}

const data = await response.json();
return data.data;
};
11 changes: 11 additions & 0 deletions api/player/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,14 @@ export type CoachDetailResponse = {
};
};
};

export type PitcherDetailResponse = {
data: {
gameplayer: PitcherPersonalInfo;
recentgamerecordlist: PitcherGameRecord[];
recentgamerecordlistfutures: PitcherGameRecord[];
seasonsummary: PitcherSeasonSummary;
seasonsummaryfutures: PitcherSeasonSummary;
yearrecordlist: PitcherYearRecord[];
};
};
13 changes: 12 additions & 1 deletion app/(menu)/ktwiz/wallpaper/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
import Image from "next/image";
import { wallpaper_img } from "@/assets/images/@index";

export default function page() {
return <div>page입니다</div>;
return (
<Image
className="rounded-[50px]"
src={wallpaper_img}
alt="wallpaper_img"
width={1100}
height={1000}
/>
);
}
7 changes: 7 additions & 0 deletions app/(menu)/media/news/[artcSeq]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { getNewsDetail } from "@/api/news/apis";
import { NewsDetail } from "@/components/media/news-detail";

export default async function page() {
const { article } = await getNewsDetail("190048"); //임시
return <NewsDetail data={article} />;
}
2 changes: 1 addition & 1 deletion app/(menu)/player/coach/[pcode]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getCoachDetail } from "@/api/player/apis";
import { CoachDetail } from "@/components/player/coach-detail";
import { CoachDetail } from "@/components/player/coach/coach-detail";

export default async function Page({
params,
Expand Down
2 changes: 1 addition & 1 deletion app/(menu)/player/coach/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getCoachList } from "@/api/player/apis";
import { CoachList } from "@/components/player/coach-list";
import { CoachList } from "@/components/player/coach/coach-list";
export const dynamic = "force-dynamic";
export default async function Page() {
const coachList = await getCoachList();
Expand Down
16 changes: 13 additions & 3 deletions app/(menu)/player/pitcher/[pcode]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
export default async function Page() {
import { getPitcherDetail } from "@/api/player/apis";
import { PitcherDetail } from "@/components/player/pitcher/pitcher-detail";

export default async function Page({
params,
}: {
params: {
pcode: string;
};
}) {
const { pcode } = params;
const data = await getPitcherDetail(pcode);
return (
<>
<div>투수 디테일 페이지</div>
{/* <CoachDetail /> */}
<PitcherDetail data={data} />
</>
);
}
2 changes: 1 addition & 1 deletion app/(menu)/player/pitcher/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getPitcherList } from "@/api/player/apis";
import PitcherList from "@/components/player/pitcher-list";
import PitcherList from "@/components/player/pitcher/pitcher-list";
export const dynamic = "force-dynamic";
export default async function page() {
const pitcherList = await getPitcherList();
Expand Down
5 changes: 0 additions & 5 deletions app/(menu)/wizpark/iksan/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { BusRouteInfo } from "@/components/wizpark/iksan/bus-route-info";
import { IKSAN_IMAGES, IKSAN_LOCATION } from "@/constants/stadium";
import { Bus, ExternalLink, Images, Map, MapPin } from "lucide-react";
import Link from "next/link";
import Script from "next/script";

export default function page() {
return (
Expand All @@ -32,10 +31,6 @@ export default function page() {
</div>
</CardContent>
</Card>
<Script
strategy="beforeInteractive"
src={`//dapi.kakao.com/v2/maps/sdk.js?appkey=${process.env.NEXT_PUBLIC_KAKAO_API_KEY}&libraries=services&autoload=false`}
/>
<CardHeader>
<CardTitle className="flex items-center">
<Map className="mr-2" />
Expand Down
5 changes: 0 additions & 5 deletions app/(menu)/wizpark/location/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui";
import KakaoMap from "@/components/common/Map";
import { Bus, ExternalLink, Map, MapPin, MoveRight, Train } from "lucide-react";
import Link from "next/link";
import Script from "next/script";
import { SUWON_LOCATION } from "@/constants/stadium";

export default function page() {


return (
<div>
<Script
strategy="beforeInteractive"
src={`//dapi.kakao.com/v2/maps/sdk.js?appkey=${process.env.NEXT_PUBLIC_KAKAO_API_KEY}&libraries=services&autoload=false`}
/>
<CardHeader>
<CardTitle className="flex items-center">
<Map className="mr-2" />
Expand Down
4 changes: 4 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Header from "@/components/layout/header";
import Footer from "@/components/layout/footer";
import { Noto_Sans_KR } from "next/font/google";
import QueryProviders from "@/providers/query-provider";
import Script from "next/script";

const notoSansKr = Noto_Sans_KR({
subsets: ["latin"],
Expand All @@ -26,6 +27,9 @@ export default function RootLayout({
return (
<html lang="en">
<body className={notoSansKr.className}>
<Script
strategy="afterInteractive"
src={`https://dapi.kakao.com/v2/maps/sdk.js?appkey=${process.env.NEXT_PUBLIC_KAKAO_API_KEY}&libraries=services&autoload=false`} />
<div className="flex flex-col min-h-screen">
<Header />
<main className="flex-1">
Expand Down
7 changes: 4 additions & 3 deletions assets/images/@index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@ export { default as logo_ktwports } from "./logo_ktsports.png";
export { default as ktwiz_en } from "./logo_ktwiz_en.svg";
export { default as ktwiz_kr } from "./logo_ktwiz_kr.svg";
export { default as gallery } from "./main_title_gallery.png";
export { default as schedule } from "./main_title_schedule.png";
export { default as bg_schedule } from "./main_title_schedule.png";
export { default as main_title_video } from "./main_title_video.png";
export { default as map_img } from "./map_img.png";
export { default as reservation } from "./parking_reservation.png";
export { default as player } from "./player_EomSangBaek.jpg";
export { default as submenu_bg } from "./submenu_bg.png";
export { default as about_img1 } from "./team_about_img1.png";
export { default as about_img2 } from "./team_about_img2.png";
export { default as about_img3 } from "./team_about_img3.png";
export { default as about_img4 } from "./team_about_img4.png";
export { default as ranking } from "./team_ranking.png";
export { default as wiz_park } from "./wiz_park.jpg";
export { default as store_banner } from "./store_banner.png";
export { default as player_banner } from "./player_banner.png";
Expand Down Expand Up @@ -68,3 +66,6 @@ export { default as iksan_stadium6 } from "./iksan_stadium6.png";
export { default as iksan_stadium7 } from "./iksan_stadium7.png";
export { default as iksan_stadium8 } from "./iksan_stadium8.png";
export { default as iksan_stadium9 } from "./iksan_stadium9.png";
export { default as ranking_score } from "./ranking_score.png";
export { default as parking_banner } from "./parking_banner.png";
export { default as wallpaper_img } from "./wallpaper_img.png";
Binary file added assets/images/parking_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/parking_reservation.png
Binary file not shown.
Binary file added assets/images/ranking_score.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/team_ranking.png
Binary file not shown.
Binary file added assets/images/wallpaper_img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion components/common/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const KakaoMap = ({ location }: { location: number[] }) => {
map.addControl(mapTypeControl, window.kakao.maps.ControlPosition.TOPRIGHT);
});
}
}, [])
}, [location])

return (
<div className="flex justify-center">
Expand Down
4 changes: 2 additions & 2 deletions components/game/boxscore/boxscore-container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const BoxscoreContainer = () => {
gameDate?: number;
gmkey?: string;
}>({
gameDate: undefined,
gmkey: "",
gameDate: 20241011,
gmkey: "33331011KTLG0",
});

const { data, isLoading } = useBoxscore(apiKey.gameDate, apiKey.gmkey);
Expand Down
17 changes: 16 additions & 1 deletion components/main/gallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import Image from "next/image";
import { gallery, store_banner, player_banner } from "@/assets/images/@index";
import Carousel from "../ui/custom-carousel";
import { CAROUSE_ITEMS } from "@/constants/main";
import { useRouter } from "next/navigation";

const Gallery = () => {
const router = useRouter();
return (
<div className="w-[1200px] justify-self-center relative mb-[100px] justify-items-center">
<div className="relative h-[620px]">
Expand All @@ -22,12 +24,25 @@ const Gallery = () => {
</div>
</div>
<div className="w-[1100px] mt-[40px] flex gap-5 justify-self-center">
<Image src={store_banner} alt="Store Banner" width={540} height={190} />
<Image
src={store_banner}
alt="Store Banner"
width={540}
height={190}
className="cursor-pointer"
onClick={() => {
window.open("https://www.ktwizstore.co.kr", "_blank");
}}
/>
<Image
src={player_banner}
alt="Player of the Month Banner"
width={540}
height={190}
className="cursor-pointer"
onClick={() => {
router.push("/player/hitter/infielder/14");
}}
/>
</div>
</div>
Expand Down
38 changes: 38 additions & 0 deletions components/main/parking.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { useRouter } from "next/navigation";
import Image from "next/image";
import { parking_banner } from "@/assets/images/@index";
import { ChevronRight } from "lucide-react";

const Parking = () => {
const router = useRouter();

return (
<div className="relative h-[280px] rounded-[20px] overflow-hidden">
<Image
src={parking_banner}
alt="parking reservaion"
width={540}
height={190}
className="cursor-pointer block"
onClick={() => {
router.push("/wizpark/parking");
}}
/>
<div className="absolute w-[540px] h-[190px] inset-0 px-10 pt-4 flex flex-col justify-center mr-10">
<p className="text-l text-SYSTEM-main font-medium mb-2">
수원 케이터 워즈 파크
</p>
<h1 className="text-2xl font-medium mb-6">사전 주차 예약제 안내</h1>
<button
onClick={() => router.push("/parking/reserve")}
className="flex items-center gap-2 text-l hover:gap-4 transition-all w-fit"
>
사전주차 예약하기
<ChevronRight size={20} />
</button>
</div>
</div>
);
};

export default Parking;
Loading
Loading