diff --git a/src/components/PricingPlan.js b/src/components/PricingPlan.js index 16aea0b..9b6f63f 100644 --- a/src/components/PricingPlan.js +++ b/src/components/PricingPlan.js @@ -209,11 +209,13 @@ const [ purchased, setPurchased ] = useState(false); const submit = async (props) => { props.preventDefault(); try { + const id = userData.user.id; const pricingRes = await Axios.put( "http://localhost:5000/users/update", { - userData.user.email, - pricing - } + id, + pricing + + } ); } catch (err) { @@ -315,10 +317,12 @@ const submit = async (props) => { ): ( + user name: {userData.user.username} -

Plan selected : {pricing}

+ Plan selected : {pricing} +
) }