Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

feat(client): remove algoliaClient, appId & apiKey #2338

Merged
merged 12 commits into from
May 22, 2019
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ class InstantSearch extends Component<Props, State> {
// @TODO: These props are currently constant.
indexName: PropTypes.string.isRequired,

searchClient: PropTypes.object.isRequired,
searchClient: PropTypes.shape({
search: PropTypes.func.isRequired,
}).isRequired,
Haroenv marked this conversation as resolved.
Show resolved Hide resolved

createURL: PropTypes.func,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import version from './version';
export default function createInstantSearch(root) {
return class CreateInstantSearch extends Component {
static propTypes = {
searchClient: PropTypes.object.isRequired,
searchClient: PropTypes.shape({
search: PropTypes.func.isRequired,
}).isRequired,
Haroenv marked this conversation as resolved.
Show resolved Hide resolved
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ const createInstantSearchServer = () => {

class CreateInstantSearchServer extends Component {
static propTypes = {
searchClient: PropTypes.object,
searchClient: PropTypes.shape({
search: PropTypes.func.isRequired,
}).isRequired,
Haroenv marked this conversation as resolved.
Show resolved Hide resolved
indexName: PropTypes.string.isRequired,
resultsState: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
};
Expand Down