Skip to content

Commit ccd724b

Browse files
committed
function name change
1 parent 05a0559 commit ccd724b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/Table/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,12 @@ const Table = () => {
207207
},
208208
{
209209
Header: () => {
210-
const randomQuestion = () => {
210+
const randomQuestionId = () => {
211211
const random = Math.floor(Math.random() * questions.length);
212212
const questionId = questions[random].id;
213213
const questionSlug = questions[questionId].url;
214214
window.open(`${questionSlug}`, '_blank');
215+
return questionId;
215216
};
216217
return (
217218
<>
@@ -220,7 +221,7 @@ const Table = () => {
220221
>
221222
Questions{' '}
222223
<Button
223-
onClick={randomQuestion}
224+
onClick={randomQuestionId}
224225
color="dark"
225226
id="random-question-button"
226227
size="sm"

0 commit comments

Comments
 (0)