Skip to content

Commit

Permalink
fixed code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
Ducica committed Oct 23, 2023
1 parent c0ba39a commit 0a85e89
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,21 @@ export const SearchAppLayout = ({ config, hasButtonSidebar }) => {
>
<Grid.Row className="result-options">
{facetsAvailable && (
<>
<Grid.Column
only="mobile tablet"
mobile={2}
tablet={2}
textAlign="center"
verticalAlign="middle"
>
<Button
basic
icon="sliders"
onClick={() => setSidebarVisible(true)}
title={i18next.t("Filter results")}
aria-label={i18next.t("Filter results")}
/>
</Grid.Column>
</>
<Grid.Column
only="mobile tablet"
mobile={2}
tablet={2}
textAlign="center"
verticalAlign="middle"
>
<Button
basic
icon="sliders"
onClick={() => setSidebarVisible(true)}
title={i18next.t("Filter results")}
aria-label={i18next.t("Filter results")}
/>
</Grid.Column>
)}
<Grid.Column {...resultSortLayout}>
<ResultOptionsWithState />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
withState,
} from "react-searchkit";
import { ResultsPerPageLabel } from "./ResultsPerPageLabel";
import PropTypes from "prop-types";

export const SearchAppResultsComponent = ({
paginationOptions,
Expand Down Expand Up @@ -84,4 +85,14 @@ export const SearchAppResultsComponent = ({
);
};

SearchAppResultsComponent.propTypes = {
paginationOptions: PropTypes.object.isRequired,
layoutOptions: PropTypes.object.isRequired,
currentResultsState: PropTypes.shape({
data: PropTypes.shape({
total: PropTypes.number.isRequired,
}).isRequired,
}).isRequired,
};

export const SearchAppResults = withState(SearchAppResultsComponent);

0 comments on commit 0a85e89

Please sign in to comment.