Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export interface HitDatabaseFilterOption {
readonly value: StatusFilterType;
readonly label: string;
}
export interface AppliedHitDatabaseFilter {
readonly key: 'STATUS';
readonly value: StatusFilterType;
readonly label?: string;
}
export const availableFilters: HitDatabaseFilter[] = [
{
key: 'STATUS',
label: 'Status',
type: FilterType.Select,
options: statusFilterTypeToLabel.reduce(
(acc: HitDatabaseFilterOption[], cur: string, key: StatusFilterType) =>
acc.concat([
{
label: cur,
value: key
}
]),
[]
)
}
];
export const appliedFiltersToStatusFilterTypeArray = (
filters: AppliedHitDatabaseFilter[]
) =>