fix(SW-104): use relative url for initiation

This commit is contained in:
Michael Zetterberg
2024-08-21 15:14:24 +02:00
parent 8109148bc5
commit 63ce8a2dfb
5 changed files with 4 additions and 17 deletions

View File

@@ -13,8 +13,6 @@ import useLang from "@/hooks/useLang"
import styles from "./addCreditCardButton.module.css"
import { type AddCreditCardButtonProps } from "@/types/components/myPages/myProfile/addCreditCardButton"
let hasRunOnce = false
function useAddCardResultToast() {
@@ -47,9 +45,7 @@ function useAddCardResultToast() {
}, [intl, pathname, router, searchParams])
}
export default function AddCreditCardButton({
redirectUrl,
}: AddCreditCardButtonProps) {
export default function AddCreditCardButton() {
const intl = useIntl()
const router = useRouter()
const lang = useLang()
@@ -70,8 +66,6 @@ export default function AddCreditCardButton({
onClick={() =>
initiateAddCard.mutate({
language: lang,
mobileToken: false,
redirectUrl,
})
}
wrapping