Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions React InstantSearch Native/getting-started/.babelrc

This file was deleted.

4 changes: 3 additions & 1 deletion React InstantSearch Native/getting-started/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,15 @@ class App extends React.Component {
onSearchStateChange={this.onSearchStateChange}
>
<VirtualRefinementList attribute="brand" />

<Filters
isModalOpen={isModalOpen}
searchClient={searchClient}
toggleModal={this.toggleModal}
searchState={searchState}
toggleModal={this.toggleModal}
onSearchStateChange={this.onSearchStateChange}
/>

<SearchBox />
<Button
title="Filters"
Expand Down
4 changes: 3 additions & 1 deletion React InstantSearch Native/getting-started/app.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"expo": {
"sdkVersion": "27.0.0"
"name": "ais-ecommerce-demo-app",
"slug": "ais-ecommerce-demo-app",
"sdkVersion": "32.0.0"
}
}
6 changes: 6 additions & 0 deletions React InstantSearch Native/getting-started/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
38 changes: 19 additions & 19 deletions React InstantSearch Native/getting-started/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
"name": "ais-ecommerce-demo-app",
"version": "1.0.0",
"private": true,
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "react-native-scripts start",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"lint": "eslint .",
"lint:fix": "npm run lint -- --fix"
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject"
},
"dependencies": {
"algoliasearch": "3.33.0",
"expo": "27.1.1",
"algoliasearch": "3.32.1",
"expo": "32.0.0",
"prop-types": "15.7.2",
"react": "16.8.6",
"react-instantsearch-native": "^",
"react-native": "0.59.8"
"react": "16.5.0",
"react-instantsearch-native": "5.7.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz"
},
"devDependencies": {
"eslint": "4.19.1",
"eslint-config-algolia": "13.3.0",
"eslint-config-prettier": "4.1.0",
"eslint-plugin-import": "2.17.3",
"eslint-plugin-prettier": "3.1.0",
"eslint-plugin-react": "7.12.4",
"prettier": "1.17.1",
"react-native-scripts": "1.14.1"
"babel-preset-expo": "5.0.0",
"eslint": "5.7.0",
"eslint-config-algolia": "13.2.3",
"eslint-config-prettier": "3.6.0",
"eslint-plugin-import": "2.16.0",
"eslint-plugin-prettier": "3.0.1",
"eslint-plugin-react": "7.11.1",
"expo-cli": "3.0.6",
"prettier": "1.16.4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@ import Highlight from './Highlight';
const styles = StyleSheet.create({
separator: {
borderBottomWidth: 1,
borderColor: '#ddd',
},
item: {
padding: 10,
flexDirection: 'row',
alignItems: 'center',
flexDirection: 'column',
},
titleText: {
fontWeight: 'bold',
},
});

const InfiniteHits = ({ hits, hasMore, refine }) => (
<FlatList
data={hits}
style
keyExtractor={item => item.objectID}
ItemSeparatorComponent={() => <View style={styles.separator} />}
onEndReached={() => hasMore && refine()}
Expand Down
16 changes: 12 additions & 4 deletions React InstantSearch Native/getting-started/src/SearchBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@ import { connectSearchBox } from 'react-instantsearch-native';

const styles = StyleSheet.create({
container: {
padding: 10,
padding: 16,
backgroundColor: '#252b33',
},
input: {
height: 40,
padding: 10,
backgroundColor: '#FFFFFF',
height: 48,
padding: 12,
fontSize: 16,
backgroundColor: '#fff',
borderRadius: 4,
borderWidth: 1,
borderColor: '#ddd',
shadowColor: '#000',
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.2,
shadowRadius: 2,
},
});

Expand Down
Loading