Skip to content

Commit

Permalink
Fix: 카카오 결제하기 리다이렉트 방법 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ppochaco committed Nov 10, 2024
1 parent 70c8934 commit 0b7c91f
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions src/pages/PointPage/PurchasePointCard/PointModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,16 @@ import {
ConfirmModal,
ConfirmModalButton,
} from '@/components/Modal/ConfirmModal'
import { useAuthTokenStore } from '@/stores/auth-token'

export const PointModal = () => {
const { isOpen, onOpen, onClose } = useDisclosure()
const authToken = useAuthTokenStore((state) => state.authToken)

const redirectURL = import.meta.env.DEV ? import.meta.env.VITE_LOGIN_URL : ''

const purchasePoint = () => {
fetch(
appendParamsToUrl(`${import.meta.env.VITE_BASE_URL}/api/point/purchase`, {
point: 100,
}),
{
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${authToken}`,
},
}
window.location.href = appendParamsToUrl(
`${redirectURL}/api/point/purchase`,
{ point: 100 }
)
}

Expand Down

0 comments on commit 0b7c91f

Please sign in to comment.