Skip to content

Commit 46bdae0

Browse files
committed
adding slug changes
1 parent 8b4acdf commit 46bdae0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/Table/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,11 @@ const Table = () => {
210210
const randomQuestion = () => {
211211
const random = Math.floor(Math.random() * questions.length);
212212
const questionId = questions[random].id;
213-
const questionSlug = questions[questionId].url;
214-
window.open(`${questionSlug}`, '_blank');
213+
const questionSlug = questions[questionId].slug;
214+
window.open(
215+
`https://leetcode.com/problems/${questionSlug}/`,
216+
'_blank',
217+
);
215218
};
216219
return (
217220
<>

0 commit comments

Comments
 (0)