Skip to content

Commit

Permalink
Fixed: issue of goToOms button working when url contains api/ but not…
Browse files Browse the repository at this point in the history
… working when it contains api only(#121)
  • Loading branch information
amansinghbais committed Aug 17, 2023
1 parent 7e4152a commit 70e1683
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const goToOms = (token: string, oms: string) => {
const link = (oms.startsWith('http') ? oms.replace('api/', "") : `https://${oms}.hotwax.io/`) + `?token=${token}`
const link = (oms.startsWith('http') ? oms.replace(/api\/?/, "") : `https://${oms}.hotwax.io/`) + `?token=${token}`

window.open(link, '_blank', 'noopener, noreferrer')
}

Expand Down

0 comments on commit 70e1683

Please sign in to comment.