Make search field and tabs sticky on search results page (#38968)
This commit is contained in:
parent
8e03c9c1fc
commit
2e7df27180
@ -222,52 +222,62 @@ export const SearchResults: React.FC<{ multiColumn: boolean }> = ({
|
|||||||
title={intl.formatMessage(messages.title, { q })}
|
title={intl.formatMessage(messages.title, { q })}
|
||||||
onClick={handleHeaderClick}
|
onClick={handleHeaderClick}
|
||||||
multiColumn={multiColumn}
|
multiColumn={multiColumn}
|
||||||
|
appendContent={
|
||||||
|
<>
|
||||||
|
<div className='explore__search-header'>
|
||||||
|
<Search
|
||||||
|
singleColumn
|
||||||
|
initialValue={trimmedValue}
|
||||||
|
key={trimmedValue}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className='account__section-headline'>
|
||||||
|
<button
|
||||||
|
onClick={handleSelectAll}
|
||||||
|
className={mappedType === 'all' ? 'active' : undefined}
|
||||||
|
type='button'
|
||||||
|
>
|
||||||
|
<FormattedMessage
|
||||||
|
id='search_results.all'
|
||||||
|
defaultMessage='All'
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
onClick={handleSelectAccounts}
|
||||||
|
className={mappedType === 'accounts' ? 'active' : undefined}
|
||||||
|
type='button'
|
||||||
|
>
|
||||||
|
<FormattedMessage
|
||||||
|
id='search_results.accounts'
|
||||||
|
defaultMessage='Profiles'
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
onClick={handleSelectHashtags}
|
||||||
|
className={mappedType === 'hashtags' ? 'active' : undefined}
|
||||||
|
type='button'
|
||||||
|
>
|
||||||
|
<FormattedMessage
|
||||||
|
id='search_results.hashtags'
|
||||||
|
defaultMessage='Hashtags'
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
onClick={handleSelectStatuses}
|
||||||
|
className={mappedType === 'statuses' ? 'active' : undefined}
|
||||||
|
type='button'
|
||||||
|
>
|
||||||
|
<FormattedMessage
|
||||||
|
id='search_results.statuses'
|
||||||
|
defaultMessage='Posts'
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className='explore__search-header'>
|
|
||||||
<Search singleColumn initialValue={trimmedValue} key={trimmedValue} />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className='account__section-headline'>
|
|
||||||
<button
|
|
||||||
onClick={handleSelectAll}
|
|
||||||
className={mappedType === 'all' ? 'active' : undefined}
|
|
||||||
type='button'
|
|
||||||
>
|
|
||||||
<FormattedMessage id='search_results.all' defaultMessage='All' />
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
onClick={handleSelectAccounts}
|
|
||||||
className={mappedType === 'accounts' ? 'active' : undefined}
|
|
||||||
type='button'
|
|
||||||
>
|
|
||||||
<FormattedMessage
|
|
||||||
id='search_results.accounts'
|
|
||||||
defaultMessage='Profiles'
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
onClick={handleSelectHashtags}
|
|
||||||
className={mappedType === 'hashtags' ? 'active' : undefined}
|
|
||||||
type='button'
|
|
||||||
>
|
|
||||||
<FormattedMessage
|
|
||||||
id='search_results.hashtags'
|
|
||||||
defaultMessage='Hashtags'
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
onClick={handleSelectStatuses}
|
|
||||||
className={mappedType === 'statuses' ? 'active' : undefined}
|
|
||||||
type='button'
|
|
||||||
>
|
|
||||||
<FormattedMessage
|
|
||||||
id='search_results.statuses'
|
|
||||||
defaultMessage='Posts'
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className='explore__search-results' data-nosnippet>
|
<div className='explore__search-results' data-nosnippet>
|
||||||
<ScrollableList
|
<ScrollableList
|
||||||
scrollKey='search-results'
|
scrollKey='search-results'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user