Skip to content

Commit

Permalink
Changed creating badges to open a new Window/Tab (#6536)
Browse files Browse the repository at this point in the history
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
  • Loading branch information
shmuelie and repo-ranger[bot] authored May 29, 2021
1 parent 9b5cad0 commit 17489c0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
23 changes: 13 additions & 10 deletions frontend/components/dynamic-badge-maker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,19 @@ export default function DynamicBadgeMaker({
e.preventDefault()

const { datatype, label, dataUrl, query, color, prefix, suffix } = values
window.location.href = dynamicBadgeUrl({
baseUrl,
datatype,
label,
dataUrl,
query,
color,
prefix,
suffix,
})
window.open(
dynamicBadgeUrl({
baseUrl,
datatype,
label,
dataUrl,
query,
color,
prefix,
suffix,
}),
'_blank'
)
}

return (
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/static-badge-maker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function StaticBadgeMaker({
e.preventDefault()

const { label, message, color } = values
window.location.href = staticBadgeUrl({ baseUrl, label, message, color })
window.open(staticBadgeUrl({ baseUrl, label, message, color }), '_blank')
}

return (
Expand Down

0 comments on commit 17489c0

Please # to comment.