Skip to content

Commit

Permalink
Pass down wasInteracted from SearchResultsApp
Browse files Browse the repository at this point in the history
  • Loading branch information
tiberiuichim committed Dec 19, 2022
1 parent dd917fb commit 3407055
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
6 changes: 4 additions & 2 deletions searchlib/components/SearchApp/LandingPageApp.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import BasicSearchApp from './BasicSearchApp';

function LandingPageView(props) {
function BoostrapLandingPageView(props) {
const { appConfig, registry } = props;

const InitialViewComponent =
Expand All @@ -11,5 +11,7 @@ function LandingPageView(props) {
}

export default function LandingPageApp(props) {
return <BasicSearchApp {...props} searchViewComponent={LandingPageView} />;
return (
<BasicSearchApp {...props} searchViewComponent={BoostrapLandingPageView} />
);
}
6 changes: 4 additions & 2 deletions searchlib/components/SearchApp/SearchInputApp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { AppConfigContext } from '@eeacms/search/lib/hocs';
import BasicSearchApp from './BasicSearchApp';
import { SearchBox } from '@eeacms/search/components';

const SearchInputView = (props) => {
const BootstrapSearchInputView = (props) => {
const {
mode = 'view',
appConfigContext,
Expand Down Expand Up @@ -56,7 +56,9 @@ const SearchInputView = (props) => {
const SearchInputViewWrapper = (props) => {
return (
<AppConfigContext.Consumer>
{(context) => <SearchInputView appConfigContext={context} {...props} />}
{(context) => (
<BootstrapSearchInputView appConfigContext={context} {...props} />
)}
</AppConfigContext.Consumer>
);
};
Expand Down
12 changes: 9 additions & 3 deletions searchlib/components/SearchApp/SearchResultsApp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useViews, useSearchContext } from '@eeacms/search/lib/hocs';

import BasicSearchApp from './BasicSearchApp';

function SearchResultsView(props) {
function BootstrapSearchResultsView(props) {
const { appConfig, registry } = props;

const searchContext = useSearchContext();
Expand Down Expand Up @@ -44,6 +44,12 @@ function SearchResultsView(props) {
);
}

export default function LandingPageApp(props) {
return <BasicSearchApp {...props} searchViewComponent={SearchResultsView} />;
export default function SearchResultsApp(props) {
return (
<BasicSearchApp
{...props}
wasInteracted={true}
searchViewComponent={BootstrapSearchResultsView}
/>
);
}
2 changes: 1 addition & 1 deletion searchlib/components/SearchView/FilterAsideContentView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const FilterAsideContentView = (props) => {
<Grid centered>
<Grid.Column textAlign="center">
<div className="prev-next-paging">
{(!!wasInteracted || !appConfig.showFilters) && <Paging />}
{!!wasInteracted && <Paging />}
</div>
</Grid.Column>
</Grid>
Expand Down

0 comments on commit 3407055

Please sign in to comment.