Skip to content

Commit 9d15194

Browse files
authored
FIXUP - Adding hits per page configuration. (#13)
* Adding hits per page configuration. * Re-build * remove HitsPerPage import * 1.0.2
1 parent 0b5090b commit 9d15194

File tree

6 files changed

+4335
-6797
lines changed

6 files changed

+4335
-6797
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Stanford c-ShARP Subtheme
22

3-
1.0.0
3+
1.0.2
44
--------------------------------------------------------------------------------
5-
_Release Date: 202X-XX-XX_
5+
_Release Date: 2024-05-16_
6+
- Added configuration to instantsearch
7+
- Set hitsPerPage to 1000

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# [c-ShARP Subtheme](https://github.com/SU-SWS/c_ShARP_subtheme)
2-
##### Version: 1.0.1
2+
##### Version: 1.0.2
33

4-
Changelog: [Changelog.txt](CHANGELOG.txt)
4+
Changelog: [Changelog.md](CHANGELOG.md)
55

66
Description
77
---
@@ -19,8 +19,8 @@ The c-ShARP Subtheme is a Stanford sub-theme that works with the Stanford Basic
1919

2020
Documentation
2121
---
22-
See subtheming guides and best practices here:
23-
https://devguide.sites.stanford.edu/front-end/drupal/sub-themes
22+
See subtheming guides and best practices here:
23+
https://devguide.sites.stanford.edu/front-end/drupal/sub-themes
2424

2525
Configuration
2626
---

algolia-search/dist/islands/algolia-search.island.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

algolia-search/src/algolia-search.island.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import algoliasearch from 'algoliasearch/lite';
22
import {createIslandWebComponent} from 'preact-island'
3-
import {HitsProps, InstantSearch, useHits} from 'react-instantsearch';
3+
import {HitsProps, InstantSearch, useHits, Configure} from 'react-instantsearch';
44
import SearchForm from "./search-form";
55
import EventHit from "./hits/events";
66
import NewsHit from "./hits/news";
77
import DefaultHit from "./hits/default-hit";
88
import styled from "styled-components";
99
import {StanfordHit} from "./hits/hit.types";
10+
import {lazy} from "preact/compat";
1011

1112
const islandName = 'algolia-search'
1213
const appId = window.drupalSettings?.stanfordAlgolia.appId || process.env.ALGOLIA_APP_ID
@@ -101,8 +102,12 @@ const Search = () => {
101102
[searchIndex]: initialUiState,
102103
}}
103104
future={{preserveSharedStateOnUnmount: true}}
105+
104106
>
105107
<Container>
108+
<Configure
109+
hitsPerPage={1000}
110+
/>
106111
<SearchForm/>
107112
<CustomHits/>
108113
</Container>

0 commit comments

Comments
 (0)