Skip to content

Commit

Permalink
Merge pull request #175 from ppochaco/fix/157-point
Browse files Browse the repository at this point in the history
Fix: 카카오 결제하기 리다이렉트 방법 수정
  • Loading branch information
ppochaco authored Nov 10, 2024
2 parents 3e2bffe + 0b7c91f commit 1e69fe9
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 1e69fe9

Please sign in to comment.