File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,10 @@ import "./Purchase.scss";
3131import "./../../styles/utilities.css" ;
3232import AmountChangePurchase from "@/components/detail/AmountChangePurchase" ;
3333import PurchaseMethodBtn from "@/components/purchase/PurchaseMethodBtn" ;
34+ import AuthContext from "@/contexts/AuthContext" ;
3435
3536const Purchase = ( ) => {
37+ const { user } = useContext ( AuthContext ) ;
3638 const [ thumbnailImg , setThumbnailImg ] = useState ( "" ) ;
3739 const [ title , setTitle ] = useState ( "" ) ;
3840 const [ author , setAuthor ] = useState ( "" ) ;
@@ -203,7 +205,8 @@ const Purchase = () => {
203205 performanceAmount : buyPerform ? modifiedPurchasePerformAmount : 0 ,
204206 } ,
205207 ] ,
206- paymentMethod : payableAmount === 0 ? 0 : 1 , // 0원: 0, 유료: 1
208+ paymentMethod : payableAmount === 0 ? 0 : 1 , // 0원: 0, 유료: 1,
209+ userId : user ?. id ,
207210 } ;
208211
209212 if ( buyPerform ) {
You can’t perform that action at this time.
0 commit comments