supabase-community / database-build

In-browser Postgres sandbox with AI assistance (formerly postgres.new)
https://database.build
Apache License 2.0
2.49k stars 197 forks source link

feat: lock databases usage in other tabs or windows #135

Closed jgoux closed 2 weeks ago

jgoux commented 2 weeks ago

Replaces https://github.com/supabase-community/postgres-new/pull/130 with a more robust implementation, thanks @gregnr!

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. 👍

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
database-build ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 7:59am