-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'others/예정-진행중-토너먼트-데이터-fetching-리팩토링-#1024' of github.c…
…om:42organization/42gg.client into others/토너먼트-브라켓-및-스와이퍼-로딩-컴포넌트-적용-#1203
- Loading branch information
Showing
29 changed files
with
386 additions
and
627 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,30 @@ | ||
--- | ||
name: 'Others ' | ||
about: 기타 이슈 템플릿 | ||
title: "[Others]" | ||
title: '[Others]' | ||
labels: '' | ||
assignees: mike2ox | ||
|
||
--- | ||
|
||
<!-- 기본적으로 제공하는 문서 이외의 타입일 때 해당 포멧을 기준으로 문서 작성을 권장합니다 --> | ||
<!-- 담당자는 이슈 발급자 + PO를 꼭 넣어주세요 --> | ||
|
||
## Desc | ||
|
||
<!-- 해당 이슈에 대한 요약 설명 --> | ||
|
||
- ex. 게더타운 리모델링 | ||
|
||
## Detail | ||
|
||
<!-- 해당 이슈에 대한 자세한 설명 --> | ||
|
||
## Todo | ||
- [ ] | ||
- [ ] | ||
- [ ] | ||
|
||
- [ ] | ||
- [ ] | ||
- [ ] | ||
|
||
## Etc | ||
|
||
<!-- 위 항목들 외 이슈관련 정보 작성 --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { useRouter } from 'next/router'; | ||
import { useState, useRef } from 'react'; | ||
import { Virtuoso, VirtuosoHandle } from 'react-virtuoso'; | ||
import TournamentCard from 'components/tournament/TournamentCard'; | ||
import useBeforeLiveTournamentData from 'hooks/tournament/useBeforeLiveTournamentData'; | ||
import useInterval from 'hooks/useInterval'; | ||
import styles from 'styles/main/TournamentPreview.module.scss'; | ||
|
||
export default function TournamentPreview() { | ||
const { data } = useBeforeLiveTournamentData(); | ||
const [selectedIndex, setSelectedIndex] = useState<number>(0); | ||
const virtuoso = useRef<VirtuosoHandle>(null); | ||
const router = useRouter(); | ||
|
||
const dataCombined = data | ||
? [...data.beforeTournament, ...data.liveTournament] | ||
: []; | ||
|
||
useInterval(() => { | ||
if (!data || dataCombined.length === 0) { | ||
return; | ||
} | ||
const nextIndex = (selectedIndex + 1) % dataCombined.length; | ||
setSelectedIndex(nextIndex); | ||
if (virtuoso.current !== null) { | ||
virtuoso.current.scrollToIndex({ | ||
index: nextIndex, | ||
align: 'start', | ||
behavior: 'smooth', | ||
}); | ||
} | ||
}, 5000); | ||
|
||
return ( | ||
<div | ||
className={styles.rollingBanner} | ||
onClick={() => router.push('tournament')} | ||
> | ||
<Virtuoso | ||
className={styles.virtuoso} | ||
totalCount={dataCombined.length} | ||
data={dataCombined} | ||
ref={virtuoso} | ||
itemContent={(index) => ( | ||
<TournamentCard {...dataCombined[index]} page='main' /> | ||
)} | ||
style={{ height: '100%' }} | ||
/> | ||
</div> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
34 changes: 0 additions & 34 deletions
34
components/main/TournamentPreview/TournamentPreviewItem.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 0 additions & 37 deletions
37
components/modal/admin/AdminTournamentParticipantEditModal/AdminSearchUserDropDownMenu.tsx
This file was deleted.
Oops, something went wrong.
42 changes: 0 additions & 42 deletions
42
components/modal/admin/AdminTournamentParticipantEditModal/AdminTournamenSearchBar.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.