Skip to content

Commit

Permalink
fix: challenge panel
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Sep 9, 2022
1 parent ff46656 commit 3129aba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion GZCTF/ClientApp/src/components/ChallengePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ const ChallengePanel: FC = () => {
const currentChallenges =
challenges &&
(activeTab !== 'All' ? challenges[activeTab] ?? [] : allChallenges).filter(
(challenge) => !hideSolved || !challenge.solved
(chal) =>
!hideSolved ||
(myteam &&
myteam.rank?.challenges?.find((c) => c.id === chal.id)?.type ===
SubmissionType.Unaccepted)
)

const [challenge, setChallenge] = useState<ChallengeInfo | null>(null)
Expand Down

0 comments on commit 3129aba

Please sign in to comment.