Skip to content

Commit

Permalink
add archived filter back
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinBeczak committed Nov 15, 2024
1 parent 8eee166 commit d6ded09
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ import { challengePassesCategorizationKeywordsFilter }
from '../../../services/Challenge/ChallengeCategorizationKeywords/ChallengeCategorizationKeywords';
import { challengePassesLocationFilter }
from '../../../services/Challenge/ChallengeLocation/ChallengeLocation'
import { challengePassesArchivedFilter }
from '../../../services/Challenge/ChallengeArchived/ChallengeArchived'
import { challengePassesGlobalFilter }
from '../../../services/Challenge/ChallengeGlobal/ChallengeGlobal'
import { challengePassesProjectFilter }
from '../../../services/Challenge/ChallengeProject/ChallengeProject'

const allFilters = [
challengePassesArchivedFilter,
challengePassesGlobalFilter,
challengePassesDifficultyFilter,
challengePassesKeywordFilter,
Expand Down
7 changes: 7 additions & 0 deletions src/services/Challenge/ChallengeArchived/ChallengeArchived.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export const challengePassesArchivedFilter = function(filter, challenge) {
if (!filter.archived) {
return challenge.isArchived === false

Check warning on line 3 in src/services/Challenge/ChallengeArchived/ChallengeArchived.js

View check run for this annotation

Codecov / codecov/patch

src/services/Challenge/ChallengeArchived/ChallengeArchived.js#L2-L3

Added lines #L2 - L3 were not covered by tests
}

return true
}

Check warning on line 7 in src/services/Challenge/ChallengeArchived/ChallengeArchived.js

View check run for this annotation

Codecov / codecov/patch

src/services/Challenge/ChallengeArchived/ChallengeArchived.js#L5-L7

Added lines #L5 - L7 were not covered by tests

0 comments on commit d6ded09

Please sign in to comment.