Skip to content

Commit

Permalink
Updated search examples and fixed random generation upper bound
Browse files Browse the repository at this point in the history
  • Loading branch information
shinyichen committed Jan 18, 2022
1 parent 039b623 commit aa48d8d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/react/Recommender/components/SearchExamples.jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ define([
<div className="quick-reference">
<Dl>
{searchExamples.slice(0, 7).map((entry) => {
const index = generateRandom(entry.examples.length - 1);
const index = generateRandom(entry.examples.length);
const example = entry.syntax.replace('%', entry.examples[index]);
return (
<Entry
Expand All @@ -87,7 +87,7 @@ define([
<div className="quick-reference">
<Dl>
{searchExamples.slice(7).map((entry) => {
const index = generateRandom(entry.examples.length - 1);
const index = generateRandom(entry.examples.length);
const example = entry.syntax.replace('%', entry.examples[index]);
return (
<Entry
Expand Down
12 changes: 12 additions & 0 deletions src/js/react/Recommender/models/searchExamples.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ define([], function() {
'Zaldarriaga, Matias',
'Kaspi, Victoria M.',
'Kouveliotou, Chryssa',
'Eisenhauer, Frank',
'Helmi, Amina',
'Strugarek, Antoine',
'Inserra, Cosimo',
'Szulágyi, Judit',
'Rees, Martin J.',
'Encrenaz, Therese',
'Quick, Lynnae',
'Turtle, Elizabeth',
'Showalter, Mark',
'Howard, Russell',
'Kleint, Lucia',
];

const searchExamples = [
Expand Down

0 comments on commit aa48d8d

Please sign in to comment.