|
|
@ -149,13 +149,15 @@ export default function QuestionsBrowsePage() {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const hasFilters = useMemo(
|
|
|
|
const activeFilterCount = useMemo(
|
|
|
|
() =>
|
|
|
|
() =>
|
|
|
|
selectedCompanySlugs.length > 0 ||
|
|
|
|
[
|
|
|
|
selectedQuestionTypes.length > 0 ||
|
|
|
|
...selectedCompanySlugs,
|
|
|
|
selectedQuestionAge !== 'all' ||
|
|
|
|
...selectedQuestionTypes,
|
|
|
|
selectedRoles.length > 0 ||
|
|
|
|
...(selectedQuestionAge !== 'all' ? [selectedQuestionAge] : []),
|
|
|
|
selectedLocations.length > 0,
|
|
|
|
...selectedRoles,
|
|
|
|
|
|
|
|
...selectedLocations,
|
|
|
|
|
|
|
|
].length,
|
|
|
|
[
|
|
|
|
[
|
|
|
|
selectedCompanySlugs,
|
|
|
|
selectedCompanySlugs,
|
|
|
|
selectedQuestionTypes,
|
|
|
|
selectedQuestionTypes,
|
|
|
@ -165,6 +167,8 @@ export default function QuestionsBrowsePage() {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const hasFilters = activeFilterCount > 0;
|
|
|
|
|
|
|
|
|
|
|
|
const today = useMemo(() => new Date(), []);
|
|
|
|
const today = useMemo(() => new Date(), []);
|
|
|
|
const startDate = useMemo(() => {
|
|
|
|
const startDate = useMemo(() => {
|
|
|
|
return selectedQuestionAge === 'last-year'
|
|
|
|
return selectedQuestionAge === 'last-year'
|
|
|
@ -522,6 +526,7 @@ export default function QuestionsBrowsePage() {
|
|
|
|
<div className="flex flex-col items-stretch gap-4">
|
|
|
|
<div className="flex flex-col items-stretch gap-4">
|
|
|
|
<div className="sticky top-0 border-b border-slate-300 bg-slate-50 py-4">
|
|
|
|
<div className="sticky top-0 border-b border-slate-300 bg-slate-50 py-4">
|
|
|
|
<QuestionSearchBar
|
|
|
|
<QuestionSearchBar
|
|
|
|
|
|
|
|
activeFilterCount={activeFilterCount}
|
|
|
|
query={query}
|
|
|
|
query={query}
|
|
|
|
sortOrderValue={sortOrder}
|
|
|
|
sortOrderValue={sortOrder}
|
|
|
|
sortTypeOptions={QUESTION_SORT_TYPES}
|
|
|
|
sortTypeOptions={QUESTION_SORT_TYPES}
|
|
|
|