Fixed announcement typing

Expired -> obsolete filter front
Removed useless despose utils
This commit is contained in:
2023-08-08 18:18:57 +03:00
parent 6c5c7aa0c2
commit 4135c29160
4 changed files with 22 additions and 39 deletions

View File

@ -16,18 +16,18 @@ const userCategoriesInfos: Record<UserCategory, (ann: Announcement) => string> =
`Годен до ${new Date(ann.bestBy).toLocaleDateString('ru')}`
),
needDispose: (ann: Announcement) => (
`Были заинтересованы: ${ann.bookedBy} чел.`
`Было заинтересно ${ann.bookedBy} чел.`
),
}
const composeUserCategoriesFilters: Record<UserCategory, () => FiltersType> = {
givingOut: () => ({
userId: getId(),
expired: false,
obsolete: false,
}),
needDispose: () => ({
userId: getId(),
expired: true,
obsolete: true,
}),
}