Skip to content

Commit

Permalink
refactor not to use nested template literals
Browse files Browse the repository at this point in the history
Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
  • Loading branch information
shaangill025 committed Oct 11, 2024
1 parent 7491c13 commit 253a51b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions strr-web/composables/useFees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ export const useFees = () => {

const handlePaymentRedirect = async (invoiceId: number, applicationNumber: string) => {
const paymentUrl = config.public.authWebURL + 'makepayment'
const returnUrl = encodeURIComponent(
`${window.location.href.replace('create-account', `success/${applicationNumber}/invoice/${invoiceId}`)}`
)
const payUrl = `${paymentUrl}/${invoiceId}/${returnUrl}`
const currentUrl = window.location.href
const successPath = 'success/' + applicationNumber + '/invoice/' + invoiceId
const returnUrl = encodeURIComponent(currentUrl.replace('create-account', successPath))
const payUrl = paymentUrl + '/' + invoiceId + '/' + returnUrl
await navigateTo(payUrl, { external: true })
}

Expand Down

0 comments on commit 253a51b

Please sign in to comment.