Skip to content

Commit

Permalink
fix(www) Fix query for plugin links always ?=undefined (#10453)
Browse files Browse the repository at this point in the history
Was just browsing the website and found that #10389 PR changed the prop passed to the Result component to query but did not update the Result component itself.

https://github.com/gatsbyjs/gatsby/pull/10389/files#diff-86b9922590ad1703ea1c4ae10baab77cR252
  • Loading branch information
carlrosell authored and pieh committed Dec 13, 2018
1 parent 5a08b76 commit ec3487c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions www/src/components/plugin-searchbar-body.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,14 @@ class Search extends Component {
}

// the result component is fed into the InfiniteHits component
const Result = ({ hit, pathname, search }) => {
const Result = ({ hit, pathname, query }) => {
// Example:
// pathname = `/plugins/gatsby-link/` || `/plugins/@comsoc/gatsby-mdast-copy-linked-files`
// hit.name = `gatsby-link` || `@comsoc/gatsby-mdast-copy-linked-files`
const selected = pathname.includes(hit.name)
return (
<Link
to={`/packages/${hit.name}/?=${search}`}
to={`/packages/${hit.name}/?=${query}`}
css={{
"&&": {
boxShadow: `none`,
Expand Down

0 comments on commit ec3487c

Please sign in to comment.