I just removed the logic of the hasAcquiredLockstate and rely on the hook useIsLocked everywhere. The "hasAcquiredLock" was flashing the database locked message for a split second when transitioning from one database to another. The useIsLocked doesn't have the issue. 👍
Replaces https://github.com/supabase-community/postgres-new/pull/130 with a more robust implementation, thanks @gregnr!
I just removed the logic of the
hasAcquiredLock
state and rely on the hookuseIsLocked
everywhere. The "hasAcquiredLock" was flashing thedatabase locked
message for a split second when transitioning from one database to another. TheuseIsLocked
doesn't have the issue. 👍