This PR addresses Issue #72 which requests error-handling and success-confirmation when a user updates the background image URL.
Changes
Created a verifyContent utility function that tests that the response from a URL is of the expected content-type. This way I can ensure that I'm not updating the background URL until I'm certain it resolves to a usable image, ensuring no updates on failure.
Added a PopUpModal that appears upon success or failure of the update action. This PopUpModal and its popUpMessage could be used to confirm any other update actions in the Settings view.
Updated handleSetBackground to incorporate the check with verifyContent before proceeding with any updates.
Summary
This PR addresses Issue #72 which requests error-handling and success-confirmation when a user updates the background image URL.
Changes
verifyContent
utility function that tests that the response from a URL is of the expectedcontent-type
. This way I can ensure that I'm not updating the background URL until I'm certain it resolves to a usable image, ensuring no updates on failure.PopUpModal
that appears upon success or failure of the update action. ThisPopUpModal
and itspopUpMessage
could be used to confirm any other update actions in theSettings
view.handleSetBackground
to incorporate the check withverifyContent
before proceeding with any updates.