Skip to content

Commit 02c22b3

Browse files
committed
feat(react): add multi-index hits example
1 parent f0b5e22 commit 02c22b3

File tree

14 files changed

+7599
-0
lines changed

14 files changed

+7599
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: 'algolia/react',
3+
};
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# testing
7+
/coverage
8+
9+
# production
10+
/build
11+
12+
# misc
13+
.DS_Store
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
19+
npm-debug.log*
20+
yarn-debug.log*
21+
yarn-error.log*
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"proseWrap": "never",
4+
"trailingComma": "es5"
5+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# multi-index-hits
2+
3+
_This project was generated with [create-instantsearch-app](https://github.com/algolia/create-instantsearch-app) by [Algolia](https://algolia.com)._
4+
5+
## Get started
6+
7+
To run this project locally, install the dependencies and run the local server:
8+
9+
```sh
10+
npm install
11+
npm start
12+
```
13+
14+
Alternatively, you may use [Yarn](https://http://yarnpkg.com/):
15+
16+
```sh
17+
yarn
18+
yarn start
19+
```
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "multi-index-hits",
3+
"version": "1.0.0",
4+
"private": true,
5+
"scripts": {
6+
"start": "react-scripts start",
7+
"build": "react-scripts build",
8+
"lint": "eslint .",
9+
"lint:fix": "npm run lint -- --fix"
10+
},
11+
"dependencies": {
12+
"react": "16.4.1",
13+
"react-dom": "16.4.1",
14+
"react-instantsearch-dom": "5.2.2",
15+
"react-scripts": "1.1.4"
16+
},
17+
"devDependencies": {
18+
"eslint": "4.19.1",
19+
"eslint-config-algolia": "13.1.0",
20+
"eslint-config-prettier": "2.9.0",
21+
"eslint-plugin-import": "2.13.0",
22+
"eslint-plugin-prettier": "2.6.1",
23+
"eslint-plugin-react": "7.10.0",
24+
"prettier": "1.13.5",
25+
"prop-types": "15.6.2"
26+
}
27+
}
Loading
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
<meta name="theme-color" content="#000000">
8+
9+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
10+
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.png">
11+
12+
<!--
13+
Do not use @7 in production, use a complete version like x.x.x, see website for latest version:
14+
https://community.algolia.com/react-instantsearch/Getting_started.html#load-the-algolia-theme
15+
-->
16+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.css@7/themes/algolia-min.css">
17+
18+
<title>multi-index-hits</title>
19+
</head>
20+
21+
<body>
22+
<noscript>
23+
You need to enable JavaScript to run this app.
24+
</noscript>
25+
26+
<div id="root"></div>
27+
</body>
28+
29+
</html>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"short_name": "multi-index-hits",
3+
"name": "multi-index-hits Sample",
4+
"icons": [
5+
{
6+
"src": "favicon.png",
7+
"sizes": "64x64 32x32 24x24 16x16",
8+
"type": "image/x-icon"
9+
}
10+
],
11+
"start_url": "./index.html",
12+
"display": "standalone",
13+
"theme_color": "#000000",
14+
"background_color": "#ffffff"
15+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
h1 {
2+
margin-bottom: 1rem;
3+
}
4+
5+
em {
6+
background: cyan;
7+
font-style: normal;
8+
}
9+
10+
.ais-InstantSearch__root {
11+
max-width: 1200px;
12+
margin: 0 auto;
13+
padding: 1rem;
14+
}

0 commit comments

Comments
 (0)