fixed issue where search bar was being rendered outside of channel content tab
This commit is contained in:
parent
ea7e40f268
commit
28fe56ddf3
1 changed files with 15 additions and 10 deletions
|
@ -206,16 +206,21 @@ function ChannelPage(props: Props) {
|
||||||
<Tab disabled={editing}>{__('Content')}</Tab>
|
<Tab disabled={editing}>{__('Content')}</Tab>
|
||||||
<Tab>{editing ? __('Editing Your Channel') : __('About')}</Tab>
|
<Tab>{editing ? __('Editing Your Channel') : __('About')}</Tab>
|
||||||
<Tab disabled={editing}>{__('Discussion')}</Tab>
|
<Tab disabled={editing}>{__('Discussion')}</Tab>
|
||||||
<Form onSubmit={handleSearch} className="wunderbar--channel">
|
{/* only render searchbar on content page (tab index 0 === content page) */}
|
||||||
<Icon icon={ICONS.SEARCH} />
|
{tabIndex === 0 ? (
|
||||||
<FormField
|
<Form onSubmit={handleSearch} className="wunderbar--channel">
|
||||||
className="wunderbar__input"
|
<Icon icon={ICONS.SEARCH} />
|
||||||
value={searchQuery}
|
<FormField
|
||||||
onChange={handleInputChange}
|
className="wunderbar__input"
|
||||||
type="text"
|
value={searchQuery}
|
||||||
placeholder={__('Search')}
|
onChange={handleInputChange}
|
||||||
/>
|
type="text"
|
||||||
</Form>
|
placeholder={__('Search')}
|
||||||
|
/>
|
||||||
|
</Form>
|
||||||
|
) : (
|
||||||
|
<div />
|
||||||
|
)}
|
||||||
</TabList>
|
</TabList>
|
||||||
|
|
||||||
<TabPanels>
|
<TabPanels>
|
||||||
|
|
Loading…
Reference in a new issue