Skip to content

Commit e61d71a

Browse files
committed
Fix HN links not using story modal
1 parent 58393c1 commit e61d71a

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

components/HTMLView2.jsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,9 @@ function Link({ style, url, ...props }) {
5050
// 4 types: story, comment, job, poll
5151
// Ignoring `poll` because Algolia API doesn't contain the poll content
5252
if (item?.type === 'story' || item?.type === 'poll') {
53-
router.push({
54-
pathname: '/story-modal',
55-
params: {
56-
id: item.id,
57-
tab: 'comments',
58-
},
59-
});
53+
router.push(
54+
`/story-modal/${item.id}?tab=comments`,
55+
);
6056
// TODO: Add this when Comments screen allow
6157
// async loading of comments
6258
// } else if (item?.type === 'comment') {

0 commit comments

Comments
 (0)