Files
supabase/apps/studio/state/side-panels.ts
Han Qiao 83b5664e6b fix: show run logs for gitless branches (#36949)
* 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>
2025-07-09 21:07:33 +10:00

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)