Skip to content

Commit

Permalink
Merge branch 'main' into others/관리자-토너먼트-유저-추가-검색창-수정-#1175
Browse files Browse the repository at this point in the history
  • Loading branch information
Clearsu authored Dec 22, 2023
2 parents 7a877f6 + ed3e40c commit 1554da6
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 12 deletions.
2 changes: 1 addition & 1 deletion components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Header from 'components/Layout/Header';
import HeaderStateContext from 'components/Layout/HeaderContext';
import MainPageProfile from 'components/Layout/MainPageProfile';
import Megaphone from 'components/Layout/MegaPhone';
import StyledButton from 'components/StyledButton';
import StyledButton from 'components/UI/StyledButton';
import Statistics from 'pages/statistics';
import useAnnouncementCheck from 'hooks/Layout/useAnnouncementCheck';
import useGetUserSeason from 'hooks/Layout/useGetUserSeason';
Expand Down
11 changes: 11 additions & 0 deletions components/UI/BouncingDots.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import styles from 'styles/UI/BouncingDots.module.scss';

export default function BouncingDots() {
return (
<div className={styles.bouncingDots}>
<div className={styles.dot}></div>
<div className={styles.dot}></div>
<div className={styles.dot}></div>
</div>
);
}
2 changes: 1 addition & 1 deletion components/EmptyImage.tsx → components/UI/EmptyImage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import NotiEmptyEmoji from 'public/image/noti_empty.svg';
import styles from 'styles/EmptyImage.module.scss';
import styles from 'styles/UI/EmptyImage.module.scss';

function EmptyImage() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MouseEventHandler } from 'react';
import styles from 'styles/StyledButton.module.scss';
import styles from 'styles/UI/StyledButton.module.scss';

type StyledButtonProps = {
onClick: MouseEventHandler<HTMLButtonElement>;
Expand Down
2 changes: 1 addition & 1 deletion components/store/InventoryList.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import { instance } from 'utils/axios';
import { InfinityScroll } from 'utils/infinityScroll';
import EmptyImage from 'components/EmptyImage';
import { InfiniteScrollComponent } from 'components/store/InfiniteScrollComponent';
import { InvetoryItem } from 'components/store/InventoryItem';
import StoreLoading from 'components/store/StoreLoading';
import EmptyImage from 'components/UI/EmptyImage';
import styles from 'styles/store/Inventory.module.scss';

function fetchInventoryData(page: number) {
Expand Down
15 changes: 10 additions & 5 deletions components/tournament/TournamentMatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,23 @@ import {
} from '@g-loot/react-tournament-brackets/dist/src/types';
import { useRecoilValue } from 'recoil';
import { clickedTournamentState } from 'utils/recoil/tournament';
import BouncingDots from 'components/UI/BouncingDots';
import styles from 'styles/tournament/TournamentMatch.module.scss';
interface TournamentMatchPartyProps {
party: Participant;
teamNameFallback: string;
resultFallback: (participant: Participant) => string;
onMouseEnter: (partyId: string | number) => void;
onPartyClick: (party: Participant, partyWon: boolean) => void;
highLightUser?: string;
state: string;
}

function TournamentMatchParty({
party,
teamNameFallback,
onMouseEnter,
onPartyClick,
resultFallback,
state,
}: TournamentMatchPartyProps) {
const highLightUser = useRecoilValue(clickedTournamentState);

Expand Down Expand Up @@ -50,7 +51,11 @@ function TournamentMatchParty({
{party.name !== 'TBD' ? party.name : ''}
</div>
<div className={styles.score}>
{party.resultText ?? resultFallback(party)}
{state === 'LIVE' || state === 'WAIT' ? (
<BouncingDots />
) : (
party.resultText
)}
</div>
</div>
);
Expand Down Expand Up @@ -82,14 +87,14 @@ export default function TournamentMatch({
teamNameFallback={teamNameFallback}
onMouseEnter={onMouseEnter}
onPartyClick={onPartyClick}
resultFallback={resultFallback}
state={match.state}
></TournamentMatchParty>
<TournamentMatchParty
party={bottomParty}
teamNameFallback={teamNameFallback}
onMouseEnter={onMouseEnter}
onPartyClick={onPartyClick}
resultFallback={resultFallback}
state={match.state}
></TournamentMatchParty>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Home: NextPage = () => {
return (
<div className={styles.container}>
<SearchBar />
{tournamentData?.length && (
{tournamentData && tournamentData?.length > 0 && (
<Section path='tournament' sectionTitle={'Tournament'} />
)}
<Section path='rank' sectionTitle={'Ranking'} />
Expand Down
2 changes: 1 addition & 1 deletion pages/login.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Image from 'next/image';
import { useRouter } from 'next/router';
import { useEffect } from 'react';
import StyledButton from 'components/StyledButton';
import StyledButton from 'components/UI/StyledButton';
import styles from 'styles/Login.module.scss';

function Login() {
Expand Down
30 changes: 30 additions & 0 deletions styles/UI/BouncingDots.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.bouncingDots {
display: flex;
justify-content: space-between;
width: 1rem;
.dot {
width: 0.2rem;
height: 0.2rem;
background-color: white;
border-radius: 50%;
animation: wave 1.3s linear infinite;
&:nth-child(2) {
animation-delay: -1.1s;
}
&:nth-child(3) {
animation-delay: -0.9s;
}
}
}

@keyframes wave {
0%,
60%,
100% {
margin-top: 0;
}

30% {
margin-top: -0.3rem;
}
}
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion styles/tournament/TournamentMatch.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
.partyName {
margin-left: 1rem;
}

.score {
margin-right: 1rem;
margin-left: auto;
}
}
Expand Down

0 comments on commit 1554da6

Please sign in to comment.