Skip to content

Commit 8eb1a9d

Browse files
committed
TAL - search results page updates
1 parent 783a9e0 commit 8eb1a9d

File tree

5 files changed

+67
-21
lines changed

5 files changed

+67
-21
lines changed

src/apps/talent-search/src/components/search-input/SearchInput.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { EmsiSkill, EmsiSkillSources, InputSkillSelector, Skill } from '~/libs/s
66
import styles from './SearchInput.module.scss'
77

88
interface SearchInputProps {
9+
className?: string
910
readonly autoFocus?: boolean
1011
onChange: (skills: Skill[]) => void
1112
skills: Skill[]
@@ -29,6 +30,7 @@ const SearchInput: FC<SearchInputProps> = props => {
2930

3031
return (
3132
<InputSkillSelector
33+
className={props.className}
3234
autoFocus={props.autoFocus}
3335
placeholder='Enter skills you are searching for...'
3436
useWrapper={false}

src/apps/talent-search/src/routes/search-results-page/SearchResultsPage.module.scss

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,34 @@
11
@import "@libs/ui/styles/includes";
22

3+
.headerWrap {
4+
height: 156px;
5+
}
6+
7+
.headerContentLayout {
8+
height: 100%;
9+
background-image: url("../../assets/background.png");
10+
background-size: cover;
11+
background-repeat: no-repeat;
12+
padding: 0 $sp-8;
13+
}
14+
15+
.summaryText {
16+
margin: $sp-4 0 $sp-5;
17+
text-align: center;
18+
color: $black-60;
19+
> span {
20+
color: $black-100;
21+
}
22+
}
23+
24+
.searchInput {
25+
margin-top: $sp-10;
26+
}
327

428
.contentLayout {
529
background: $black-5;
6-
padding: $sp-8;
30+
padding: $sp-2;
31+
position: relative;
732
}
833

934
.resultsWrap {

src/apps/talent-search/src/routes/search-results-page/SearchResultsPage.tsx

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { FC, useCallback } from 'react'
2+
import classNames from 'classnames'
23

3-
import { ContentLayout } from '~/libs/ui'
4+
import { ContentLayout, LoadingSpinner } from '~/libs/ui'
45
import { EmsiSkill } from '~/libs/shared'
56

67
import { TalentCard } from '../../components/talent-card'
@@ -19,28 +20,42 @@ const SearchResultsPage: FC = () => {
1920
), [skills])
2021

2122
return (
22-
<ContentLayout
23-
contentClass={styles.contentLayout}
24-
outerClass={styles['contentLayout-outer']}
25-
innerClass={styles['contentLayout-inner']}
26-
>
23+
<>
2724
<div className={styles.headerWrap}>
28-
<SearchInput
29-
skills={skills}
30-
onChange={setSkills}
31-
/>
32-
</div>
33-
<div className={styles.resultsWrap}>
34-
{matches.map(member => (
35-
<TalentCard
36-
member={member}
37-
match={member.skillScore}
38-
key={member.userId}
39-
isMatchingSkill={isMatchingSkill}
25+
<ContentLayout contentClass={styles.headerContentLayout}>
26+
<SearchInput
27+
className={styles.searchInput}
28+
skills={skills}
29+
onChange={setSkills}
4030
/>
41-
))}
31+
</ContentLayout>
4232
</div>
43-
</ContentLayout>
33+
<ContentLayout
34+
contentClass={styles.contentLayout}
35+
outerClass={styles['contentLayout-outer']}
36+
innerClass={styles['contentLayout-inner']}
37+
>
38+
<LoadingSpinner hide={!loading} />
39+
<div className={classNames('body-medium-normal', styles.summaryText)}>
40+
We found&nbsp;
41+
<span className='body-medium-medium'>
42+
{matches.length}
43+
&nbsp;Experts
44+
</span>
45+
&nbsp;that match your search
46+
</div>
47+
<div className={styles.resultsWrap}>
48+
{matches.map(member => (
49+
<TalentCard
50+
member={member}
51+
match={member.skillScore}
52+
key={member.userId}
53+
isMatchingSkill={isMatchingSkill}
54+
/>
55+
))}
56+
</div>
57+
</ContentLayout>
58+
</>
4459
)
4560
}
4661

src/libs/shared/lib/components/input-skill-selector/InputSkillSelector.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const fetchSkills = (queryTerm: string): Promise<Option[]> => (
2828
)
2929

3030
interface InputSkillSelectorProps {
31+
readonly className?: string
3132
readonly autoFocus?: boolean
3233
readonly limit?: number
3334
readonly label?: string
@@ -43,6 +44,7 @@ interface InputSkillSelectorProps {
4344

4445
const InputSkillSelector: FC<InputSkillSelectorProps> = props => (
4546
<InputMultiselect
47+
className={props.className}
4648
autoFocus={props.autoFocus}
4749
label={props.label ?? 'Select Skills'}
4850
limit={props.limit}

src/libs/ui/lib/components/form/form-groups/form-input/input-multiselect/InputMultiselect.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export type InputMultiselectThemes = 'tc-green' | 'clear'
2525

2626
export interface InputMultiselectProps {
2727
readonly autoFocus?: boolean
28+
readonly className?: string
2829
readonly dirty?: boolean
2930
readonly disabled?: boolean
3031
readonly dropdownIcon?: ReactNode
@@ -93,6 +94,7 @@ const InputMultiselect: FC<InputMultiselectProps> = (props: InputMultiselectProp
9394
<AsyncSelect
9495
className={
9596
classNames(
97+
props.className,
9698
styles.multiselect,
9799
styles[`theme-${props.theme ? props.theme : 'tc-green'}`],
98100
props.useWrapper === false && styles.multiSelectWrap,

0 commit comments

Comments
 (0)