mirror of
https://github.com/supabase/supabase.git
synced 2026-05-08 15:57:47 +08:00
* fix: show run logs for gitless branches * fix: show edit branch modal for production * remove side panel github --------- Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
24 lines
805 B
TypeScript
24 lines
805 B
TypeScript
import { proxy, snapshot, useSnapshot } from 'valtio'
|
|
|
|
export type SidePanelTypeProps = 'VERCEL_CONNECTIONS' | 'GITHUB_CONNECTIONS'
|
|
|
|
export const sidePanelsState = proxy({
|
|
/**
|
|
* Vercel connections
|
|
*/
|
|
vercelConnectionsOpen: false as boolean,
|
|
setVercelConnectionsOpen: (bool: boolean) => {
|
|
sidePanelsState.vercelConnectionsOpen = bool
|
|
},
|
|
// ID to determine which vercel integration installation to use
|
|
vercelConnectionsIntegrationId: undefined as undefined | string,
|
|
setVercelConnectionsIntegrationId: (id: string) => {
|
|
sidePanelsState.vercelConnectionsIntegrationId = id
|
|
},
|
|
})
|
|
|
|
export const getSidePanelsState = () => snapshot(sidePanelsState)
|
|
|
|
export const useSidePanelsStateSnapshot = (options?: Parameters<typeof useSnapshot>[1]) =>
|
|
useSnapshot(sidePanelsState, options)
|