Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 126989c

Browse filesBrowse files
Sean PrashadSean Prashad
Sean Prashad
authored and
Sean Prashad
committed
Append trailing slash for premium question solution URLs
1 parent f7051a9 commit 126989c
Copy full SHA for 126989c

File tree

Expand file treeCollapse file tree

1 file changed

+20
-15
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+20
-15
lines changed

‎src/components/Table/index.js

Copy file name to clipboardExpand all lines: src/components/Table/index.js
+20-15Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -188,21 +188,26 @@ const Table = () => {
188188
{
189189
Header: 'Solutions',
190190
accessor: 'solutions',
191-
Cell: cellInfo => (
192-
<NavLink
193-
target="_blank"
194-
href={`${cellInfo.row.original.url}discuss/?currentPage=1&orderBy=most_votes`}
195-
onClick={() => {
196-
Event(
197-
'Table',
198-
'Clicked solution',
199-
`${cellInfo.row.original.name} solution`,
200-
);
201-
}}
202-
>
203-
<FaExternalLinkAlt />
204-
</NavLink>
205-
),
191+
Cell: cellInfo => {
192+
const url = cellInfo.row.original.premium
193+
? `${cellInfo.row.original.url}/`
194+
: cellInfo.row.original.url;
195+
return (
196+
<NavLink
197+
target="_blank"
198+
href={`${url}discuss/?currentPage=1&orderBy=most_votes`}
199+
onClick={() => {
200+
Event(
201+
'Table',
202+
'Clicked solution',
203+
`${cellInfo.row.original.name} solution`,
204+
);
205+
}}
206+
>
207+
<FaExternalLinkAlt />
208+
</NavLink>
209+
);
210+
},
206211
disableFilters: true,
207212
},
208213
{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.