diff --git a/src/apps/customer-portal/src/pages/talent-search/TalentSearchPage/TalentSearchPage.tsx b/src/apps/customer-portal/src/pages/talent-search/TalentSearchPage/TalentSearchPage.tsx index cbc953423..03fbadcc6 100644 --- a/src/apps/customer-portal/src/pages/talent-search/TalentSearchPage/TalentSearchPage.tsx +++ b/src/apps/customer-portal/src/pages/talent-search/TalentSearchPage/TalentSearchPage.tsx @@ -77,6 +77,11 @@ export const TalentSearchPage: FC = () => { ) const hasSkillSearch = selectedSkills.length > 0 + const hasActiveFilters = hasSkillSearch + || selectedCountries.length > 0 + || onlyOpenToWork + || onlyActive + const shouldShowIntroState = !hasSearched && !hasActiveFilters const activeSort: TalentSearchSortOption = hasSkillSearch ? 'matching-index' : sortBy const sortOptions = useMemo( (): InputSelectOption[] => (hasSkillSearch @@ -336,7 +341,7 @@ export const TalentSearchPage: FC = () => { }, [isExtractingSkills, jobDescription, runMemberSearch]) useEffect(() => { - if (!hasSearched || isExtractingSkills) { + if ((shouldShowIntroState) || isExtractingSkills) { return } @@ -348,12 +353,14 @@ export const TalentSearchPage: FC = () => { runMemberSearch(selectedSkills, { generation: searchGenerationRef.current, page: 1 }) }, [ hasSearched, + hasActiveFilters, isExtractingSkills, onlyActive, onlyOpenToWork, runMemberSearch, selectedCountries, selectedSkills, + shouldShowIntroState, ]) const handleLoadMore = useCallback((): void => { @@ -441,7 +448,7 @@ export const TalentSearchPage: FC = () => { onChange={(event: ChangeEvent) => { const value = (event.target.value || []) as InputMultiselectOption[] setSelectedSkills(value) - setHasSearched(value.length > 0) + setHasSearched(true) if (value.length === 0) { setLastSearchedDescription('') } @@ -514,10 +521,10 @@ export const TalentSearchPage: FC = () => {
- {!hasSearched && ( + {shouldShowIntroState && (
{ className={styles.emptyIcon} />

Find the right talent

-

- Paste a job description on the left and hit  - Search -  - Our AI will match you with the - best candidates from our network. -

)} - {hasSearched && ( + {!shouldShowIntroState && (
{!isSearchingMembers && (