We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05a0559 commit ccd724bCopy full SHA for ccd724b
src/components/Table/index.js
@@ -207,11 +207,12 @@ const Table = () => {
207
},
208
{
209
Header: () => {
210
- const randomQuestion = () => {
+ const randomQuestionId = () => {
211
const random = Math.floor(Math.random() * questions.length);
212
const questionId = questions[random].id;
213
const questionSlug = questions[questionId].url;
214
window.open(`${questionSlug}`, '_blank');
215
+ return questionId;
216
};
217
return (
218
<>
@@ -220,7 +221,7 @@ const Table = () => {
220
221
>
222
Questions{' '}
223
<Button
- onClick={randomQuestion}
224
+ onClick={randomQuestionId}
225
color="dark"
226
id="random-question-button"
227
size="sm"
0 commit comments