Skip to content

Commit

Permalink
fix:試合結果がない場合の表示を変更 (#586)
Browse files Browse the repository at this point in the history
  • Loading branch information
speak-mentaiko authored Oct 25, 2024
1 parent be7e493 commit 3f98859
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/kcmsf/src/pages/result.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ export const Result = () => {

const preMatches = useMemo(
() => mainMatchData.filter((match) => match.departmentType === department),
[mainMatchData]
[mainMatchData, department]
);

const mainMatches = useMemo(
() => preMatchData.filter((match) => match.departmentType === department),
[preMatchData]
[preMatchData, department]
);

return (
Expand Down Expand Up @@ -108,9 +108,12 @@ const MainMatchColum = (props: {
teamData: Map<string, string>;
}) => {
const loserID =
props.match.winnerId === props.match.team1.id
? props.match.team2.id
: props.match.team1.id;
props.match.winnerId !== ""
? props.match.team1.id == props.match.winnerId
? props.match.team2.id
: props.match.team1.id
: "";

return (
<>
<Table.Td className="td">
Expand Down

0 comments on commit 3f98859

Please sign in to comment.