Skip to content

Commit

Permalink
move icon refresh to main page
Browse files Browse the repository at this point in the history
  • Loading branch information
dzonidoo committed Dec 4, 2023
1 parent aee854c commit da002b0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
17 changes: 11 additions & 6 deletions assets/agenda/components/AgendaApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import BookmarkTabs from 'components/BookmarkTabs';
import {setActiveDate, setAgendaDropdownFilter} from 'local-store';
import {previewConfigSelector, detailsConfigSelector} from 'ui/selectors';
import {SearchResultsBar} from 'search/components/SearchResultsBar';
import NewItemsIcon from 'search/components/NewItemsIcon';

const modals = {
shareItem: ShareItemModal,
Expand Down Expand Up @@ -248,24 +249,18 @@ class AgendaApp extends BaseApp {
<SearchResultsBar
initiallyOpen={showFilters}
minimizeSearchResults={this.state.minimizeSearchResults}

showTotalItems={showTotalItems}
showTotalLabel={showTotalLabel}
showSaveTopic={showSaveTopic}
onClearAll={() => {
this.props.toggleDropdownFilter('itemType', null);
}}

totalItems={this.props.totalItems}
totalItemsLabel={totalItemsLabel}

saveMyTopic={saveMyTopic}
activeTopic={this.props.activeTopic}
topicType="agenda"

newItems={this.props.newItems}
refresh={this.props.fetchItems}

setQuery={this.props.setQuery}
/>
)
Expand All @@ -278,6 +273,16 @@ class AgendaApp extends BaseApp {
featuredFilter={this.props.featuredOnly}
hasAgendaFeaturedItems={this.props.hasAgendaFeaturedItems}
/>
{!(this.props.newItems || []).length ? null : (
<div className="navbar navbar--flex navbar--small">
<div className="navbar__inner navbar__inner--end">
<NewItemsIcon
newItems={this.props.newItems}
refresh={this.props.fetchItems}
/>
</div>
</div>
)}
</div>
<AgendaList
actions={this.props.actions}
Expand Down
13 changes: 0 additions & 13 deletions assets/search/components/SearchResultsBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
import {Dropdown} from './../../../components/Dropdown';

import {SearchResultTagsList} from './SearchResultTagsList';
import NewItemsIcon from '../NewItemsIcon';


class SearchResultsBarComponent extends React.Component<any, any> {
Expand Down Expand Up @@ -222,17 +221,6 @@ class SearchResultsBarComponent extends React.Component<any, any> {

{this.props.children}
</div>

{!(this.props.newItems || []).length ? null : (
<div className="navbar navbar--flex navbar--small">
<div className="navbar__inner navbar__inner--end">
<NewItemsIcon
newItems={this.props.newItems}
refresh={this.props.refresh}
/>
</div>
</div>
)}
</React.Fragment>
);
}
Expand All @@ -255,7 +243,6 @@ SearchResultsBarComponent.propTypes = {
activeTopic: PropTypes.object,
topicType: PropTypes.string,

newItems: PropTypes.array,
refresh: PropTypes.func,

navigations: PropTypes.object,
Expand Down
15 changes: 11 additions & 4 deletions assets/wire/components/WireApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import {
listConfigSelector,
advancedSearchTabsConfigSelector,
} from 'ui/selectors';
import NewItemsIcon from 'search/components/NewItemsIcon';

const modals: any = {
shareItem: ShareItemModal,
Expand Down Expand Up @@ -230,15 +231,11 @@ class WireApp extends BaseApp {
showTotalItems={showTotalItems}
showTotalLabel={showTotalLabel}
showSaveTopic={showSaveTopic}

totalItems={this.props.totalItems}
totalItemsLabel={totalItemsLabel}

saveMyTopic={saveMyTopic}
activeTopic={this.props.activeTopic}
topicType={this.props.context === 'wire' ? this.props.context : null}

newItems={this.props.newItems}
refresh={this.props.fetchItems}
setSortQuery={this.props.setSortQuery}
setQuery={this.props.setQuery}
Expand All @@ -256,6 +253,16 @@ class WireApp extends BaseApp {
searchAllVersions={this.props.searchAllVersions}
toggleSearchAllVersions={this.props.toggleSearchAllVersions}
/>
{!(this.props.newItems || []).length ? null : (
<div className="navbar navbar--flex navbar--small">
<div className="navbar__inner navbar__inner--end">
<NewItemsIcon
newItems={this.props.newItems}
refresh={this.props.fetchItems}
/>
</div>
</div>
)}
</div>
<ItemsList
actions={this.props.actions}
Expand Down

0 comments on commit da002b0

Please sign in to comment.