Skip to content

Commit

Permalink
Use __CLIENT__ to prevent SSR. Remove custom NoSSR helper.
Browse files Browse the repository at this point in the history
  • Loading branch information
ksuess committed Feb 17, 2021
1 parent 6fdd01a commit ee418dd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/Views/FacetedSearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ import { CustomESRequestSerializer } from '../Searchkit/CustomESRequestSerialize
import { CustomESResponseSerializer } from '../Searchkit/CustomESResponseSerializer';
import { Results } from '../Searchkit/Results';

import { NoSSR } from '../helpers';

import { useDispatch } from 'react-redux';
import { flattenESUrlToPath } from '../helpers';

Expand Down Expand Up @@ -391,7 +389,7 @@ const FacetedSearch = ({ data }) => {

return (
<Segment vertical>
<NoSSR>
{__CLIENT__ && (
<OverridableContext.Provider value={overriddenComponents}>
<ReactSearchKit
searchApi={searchApi}
Expand Down Expand Up @@ -487,7 +485,7 @@ const FacetedSearch = ({ data }) => {
</Container>
</ReactSearchKit>
</OverridableContext.Provider>
</NoSSR>
)}
</Segment>
);
};
Expand Down

0 comments on commit ee418dd

Please sign in to comment.