Skip to content

Commit

Permalink
[Fix] update tsconfig, component name
Browse files Browse the repository at this point in the history
  • Loading branch information
mike2ox committed Jan 19, 2023
1 parent 30fe3da commit f0b423e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions components/game/GameResultList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';
import { useRecoilState } from 'recoil';
import { Game } from 'types/gameTypes';
import infScroll from 'utils/infinityScroll';
import InfScroll from 'utils/infinityScroll';
import { clickedGameItemState } from 'utils/recoil/game';
import GameResultEmptyItem from './GameResultEmptyItem';
import GameResultBigItem from './big/GameResultBigItem';
Expand All @@ -13,8 +13,9 @@ interface GameResultListProps {
path: string;
}

// path === /pingpong/games/users/him?mode=rank&season=1&gameId=
export default function GameResultList({ path }: GameResultListProps) {
const { data, fetchNextPage, status, remove, refetch } = infScroll(path);
const { data, fetchNextPage, status, remove, refetch } = InfScroll(path);
const [isLast, setIsLast] = useState<boolean>(false);
const [clickedGameItem, setClickedGameItem] =
useRecoilState(clickedGameItemState);
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"utils/infinityScroll.js",
"utils/infinityScoll.js"
],
"typeRoots" : ["./@types", "./node_modules/@types"],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion utils/infinityScroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useInfiniteQuery } from 'react-query';
import { errorState } from 'utils/recoil/error';
import instance from './axios';

export default function infScroll(path: string) {
export default function InfScroll(path: string) {
const setError = useSetRecoilState(errorState);

const getList = ({ pageParam = 0 }) =>
Expand Down

0 comments on commit f0b423e

Please sign in to comment.