Skip to content

Commit

Permalink
💡 Comment: 불필요한 주석 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
SNXWXH committed Aug 2, 2024
1 parent a69c039 commit 780bd05
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 53 deletions.
3 changes: 1 addition & 2 deletions src/app/(main)/@questions/questionsModal/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default function Questions() {
router.push('/testResultModal');
} else {
const errorText = await response.text();
console.error('Failed to fetch test result:', errorText);
throw new Error(errorText);
}
sessionStorage.removeItem('questions');
sessionStorage.removeItem('positionArr');
Expand All @@ -96,7 +96,6 @@ export default function Questions() {
const onBackClick = () => {
setCurrentQuestionIndex((prevIndex) => prevIndex - 1);
const back = positionArr.slice(0, -1);
console.log(back);
setPositionArr(back);
sessionStorage.setItem('positionArr', JSON.stringify(back));
};
Expand Down
4 changes: 2 additions & 2 deletions src/app/(main)/@result/(.)testResultModal/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ const Page: React.FC = () => {
const data: TPositionStatisticProps[] = await response.json();
setStatistics(data);
} else {
console.error('Failed to fetch position statistics');
throw new Error('Failed to fetch position statistics');
}
} catch (error) {
console.error('Failed to fetch position statistics', error);
throw new Error('Failed to fetch position statistics');
}
};

Expand Down
3 changes: 2 additions & 1 deletion src/app/(test)/test/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use client';

import Image from 'next/image';
import { useEffect, useState } from 'react';

const images = [
Expand Down Expand Up @@ -51,7 +52,7 @@ export default function Loading() {
<div className="relative flex justify-center flex-col items-center h-dvh max-w-md m-auto bg-white">
<div className="w-60 h-60">
{images.map((image, index) => (
<img
<Image
key={index}
src={image}
alt={`슬라이드 이미지 ${index}`}
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/news/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export async function GET(req: NextRequest) {
const { searchParams } = req.nextUrl;
const searchMax = searchParams.get('searchMax');
const pageNum = searchParams.get('pageNum');
// console.log(searchMax, pageNum, 'params test');

try {
const response = await fetch(
`${process.env.API_URL}/news_list?searchmax=${searchMax}&page=${pageNum}`,
Expand Down
6 changes: 1 addition & 5 deletions src/app/api/predict/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ export async function GET(req: NextRequest) {
});

const data = await response.json();
return NextResponse.json(data.predictWinRate, {
// headers: {
// 'Cache-Control': 'no-store',
// },
});
return NextResponse.json(data.predictWinRate, {});
} catch (error) {
throw new Error('Server-Failed to fetch predict Data');
}
Expand Down
6 changes: 1 addition & 5 deletions src/app/api/startingPitcher/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ export async function GET(req: NextRequest) {
});

const data = await response.json();
return NextResponse.json(data, {
// headers: {
// 'Cache-Control': 'no-store',
// },
});
return NextResponse.json(data, {});
} catch (error) {
throw new Error('Server-Failed to fetch starting Data');
}
Expand Down
10 changes: 0 additions & 10 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,6 @@
position: absolute;
top: 0;
left: 0;
/* width: 100%;
height: 100%;
pointer-events: none;
background: linear-gradient(
135deg,
rgba(255, 255, 255, 0.3) 0%,
rgba(158, 127, 200, 0.1) 40%,
rgba(236, 162, 162, 0.2) 70%,
rgba(183, 194, 111, 0.3) 100%
); */
opacity: 0.7;
mix-blend-mode: overlay;
animation: shimmer 2s infinite linear;
Expand Down
1 change: 0 additions & 1 deletion src/components/Index.tsx

This file was deleted.

14 changes: 1 addition & 13 deletions src/components/player/Banner.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
'use client';

import { usePathname } from 'next/navigation';
// import { useState } from 'react';
import BannerBtn from '../BannerBtn';
import BatterBanner from './BatterBanner';
//interface BannerProps {
//title: string;
// subtitle: string;
//}

type TPathNameText = {
[key: string]: {
title: string;
Expand All @@ -18,10 +14,6 @@ export default function Banner() {
const pathname = usePathname().split('/')[2];
const pathname2 = usePathname().split('/')[3];
const text: TPathNameText = {
// coach: {
// title: '코칭스탭',
// subtitle: '최고의 kt wiz 코칭스탭을 소개합니다.',
// },
pitcher: {
title: '투수',
subtitle: 'kt wiz의 자랑스런 ‘첫 번째 선수단’을 소개합니다',
Expand All @@ -30,10 +22,6 @@ export default function Banner() {
title: '타자',
subtitle: 'kt wiz의 자랑스런 ‘첫 번째 선수단’을 소개합니다',
},
// cheerleader: {
// title: '응원단',
// subtitle: 'kt wiz꽃! kt wiz의 응원단',
// },
};

return (
Expand Down
1 change: 1 addition & 0 deletions src/components/player/PlayerChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export default function PlayerChart({
}: PlayerChartProps) {
const currentMetric = getPlayerMetric(position, positionCurrentMetric);
const expectedMetric = getPlayerMetric(position, positionAIMetric);

// Scale the data for each category based on the global maximum
const scaledExpectedData = positionCategory[position].categories.map(
(category, index) => {
Expand Down
12 changes: 0 additions & 12 deletions src/components/wiznews/NewsLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@ export default function NewsLoader() {
}, [inView, newsList]);
return (
<>
{/* {newsList.length &&
newsList.map(
(news, index) =>
news && (
<NewsBalloon
key={news.artcTitle}
direction={index % 2 === 0 ? 'right' : 'left'}
content={news.artcTitle}
id={news.artcSeq}
/>
),
)} */}
<div ref={ref} className="flex w-full justify-center">
<Image
src="/svgs/baseball.svg"
Expand Down
1 change: 0 additions & 1 deletion src/utils/index.ts

This file was deleted.

0 comments on commit 780bd05

Please sign in to comment.