mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 18:05:11 +03:00
This PR makes the following changes: * Refactors the Stripe sync engine integration so that impossible states are unrepresentable in the code. * Factors out common code and functions into a single location to avoid duplication. * Factors out code to fetch installation/uninstallation and sync status into a separate hook to make the code more readable. * Shows uninstall progress when the user uninstalls the integration. * Moves the **Uninstall integration** button from the **Settings** page to the **Overview** page. This is done to avoid us having to track the uninstallation progress via the url query params when the user is redirected to the **Overview** page during uninstallation. Also it makes sense for installation/uninstallation to be available on the same location. Note that even with the above changes there are some limitations to how the uninstallation progress is shown. In particular, if the user refreshes the page, the uninstallation status is lost because the background uninstallation procedure currently doesn't update the comment on the stripe schema during uninstallation. We are making a change in the stripe sync engine code for that here: https://github.com/stripe-experiments/sync-engine/pull/113 --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>