Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add history and shareable URLs support to Instant Results #2604

Merged
merged 15 commits into from
Feb 25, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add missing key. Fixes crash in debug mode.
  • Loading branch information
JakePT committed Feb 25, 2022
commit 482a046eaebc898f583db0cfa5e32149e910a5a6
15 changes: 11 additions & 4 deletions assets/js/instant-results/components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import Sort from './tools/sort';
*/
export default () => {
const {
state: { isLoading, isSidebarOpen },
state: { isLoading },
} = useContext(Context);

return (
Expand All @@ -41,10 +41,17 @@ export default () => {
</div>

<div className="ep-search-page__body">
<Sidebar isOpen={isSidebarOpen}>
<Sidebar>
<Sort />
{facets.map((facet, index) => (
<Facet {...facet} index={index} />
{facets.map(({ label, name, postTypes, type }, index) => (
<Facet
index={index}
key={name}
label={label}
name={name}
postTypes={postTypes}
type={type}
/>
))}
</Sidebar>

Expand Down