Skip to content

Commit

Permalink
[Chore] [GGFE-240] 안쓰는 import 제거 + 중복되는 변수 없애고 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
PHJoon committed Sep 9, 2023
1 parent 0810941 commit 317006a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions components/game/GameResultList.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import React from 'react';
import { useRecoilValue } from 'recoil';
import { FaChevronDown } from 'react-icons/fa';
import { Game } from 'types/gameTypes';
import { SeasonMode } from 'types/mainType';
import { profileState } from 'utils/recoil/user';
import GameResultBigItem from 'components/game/big/GameResultBigItem';
import GameResultEmptyItem from 'components/game/GameResultEmptyItem';
import GameResultSmallItem from 'components/game/small/GameResultSmallItem';
Expand All @@ -22,8 +20,6 @@ export default function GameResultList({
const { data, status, fetchNextPage, isLast, clickedGameItem, pathName } =
useGameResultList(path);

const isGamePage = pathName === '/game';

const page =
pathName === '/' ? 'main' : pathName === '/game' ? 'game' : 'profile';

Expand All @@ -44,7 +40,7 @@ export default function GameResultList({
<GameResultBigItem
key={game.gameId}
game={game}
zIndexList={!isGamePage}
zIndexList={page !== 'game'}
radioMode={radioMode}
page={page}
/>
Expand All @@ -53,15 +49,15 @@ export default function GameResultList({
key={game.gameId}
type={type}
game={game}
zIndexList={!isGamePage}
zIndexList={page !== 'game'}
radioMode={radioMode}
page={page}
/>
);
})}
</React.Fragment>
))}
{isGamePage && !isLast && (
{page === 'game' && !isLast && (
<button
className={styles['getButton']}
onClick={() => fetchNextPage()}
Expand Down

0 comments on commit 317006a

Please sign in to comment.