diff --git a/frontend/src/components/ConfigureProfileDialog/ConfigureProfileDialog.js b/frontend/src/components/ConfigureProfileDialog/ConfigureProfileDialog.js index 7b1d3abd..8bfe8a0d 100644 --- a/frontend/src/components/ConfigureProfileDialog/ConfigureProfileDialog.js +++ b/frontend/src/components/ConfigureProfileDialog/ConfigureProfileDialog.js @@ -17,6 +17,7 @@ import useStyles from './styles'; import { setSqueakProfileFollowingRequest, + setSqueakProfileUseCustomPriceRequest, } from '../../squeakclient/requests'; export default function ConfigureProfileDialog({ @@ -34,12 +35,24 @@ export default function ConfigureProfileDialog({ }); }; + const setUseCustomPrice = (id, useCustomPrice) => { + setSqueakProfileUseCustomPriceRequest(id, useCustomPrice, () => { + reloadProfile(); + }); + }; + const handleSettingsFollowingChange = (event) => { console.log(`Following changed for profile id: ${squeakProfile.getProfileId()}`); console.log(`Following changed to: ${event.target.checked}`); setFollowing(squeakProfile.getProfileId(), event.target.checked); }; + const handleSettingsUseCustomPriceChange = (event) => { + console.log(`UseCustomPrice changed for profile id: ${squeakProfile.getProfileId()}`); + console.log(`UseCustomPrice changed to: ${event.target.checked}`); + setUseCustomPrice(squeakProfile.getProfileId(), event.target.checked); + }; + function MakeCancelButton() { return (