fix(mods): missing nsfw tags #103

Merged
enes merged 2 commits from 96-nsfw-list-tag into staging 2024-10-28 13:02:54 +00:00
Showing only changes of commit 4f4e3a7c85 - Show all commits

View File

@ -22,6 +22,15 @@ export const useFilteredMods = (
) => {
return useMemo(() => {
const nsfwFilter = (mods: ModDetails[]) => {
// Add nsfw tag to mods included in nsfwList
if (filterOptions.nsfw !== NSFWFilter.Hide_NSFW) {
mods = mods.map((mod) => {
return !mod.nsfw && nsfwList.includes(mod.aTag)
? { ...mod, nsfw: true }
: mod
})
}
// Determine the filtering logic based on the NSFW filter option
switch (filterOptions.nsfw) {
case NSFWFilter.Hide_NSFW: