mirror of
https://github.com/supabase/supabase.git
synced 2026-07-06 15:44:23 +08:00
* add main log drain form and navigation * fix submit and select * add mutation and update form * fix submit issue * fix issues with validation * fix typeerrs * add log drain table * update create log drain mutation * add delete log drain mutation * update get log drains query * fix new log drain click in cards * add delete mutation * add delete log drain * refactor gzip switch * refactor radiogroup to use formfield * add headers form * fix validation, custom headers errors * refactor to support update in form * format * add log drains to nav * update api spec and list logdrains query * wire backend * fix datadog region values * make api input password * fix url elastic * fix typerr * rm unnecessary value setter * fix state issue log drains update form * Add default values setting in useEffect to fix form issues * format * Update LogDrains table header width to 250px * add upgrade plan card when free plan * fix dumb if statement * fix the freaking headers * fix upgrade to team state * fix plan check and loading state * disable type update * Add link to documentation in Log Drains settings * show add destination only after empty state * fix bug with inputs not resetting * add gzip tooltip * rm command * defaultValue to value * add defaultValue * rm consolelog * rm anys
24 lines
533 B
TypeScript
24 lines
533 B
TypeScript
import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query'
|
|
import { useSelectedOrganization } from './useSelectedOrganization'
|
|
|
|
export function useCurrentOrgPlan() {
|
|
const currentOrg = useSelectedOrganization()
|
|
const { data, isLoading, isSuccess } = useOrgSubscriptionQuery({
|
|
orgSlug: currentOrg?.slug,
|
|
})
|
|
|
|
if (isLoading) {
|
|
return {
|
|
plan: null,
|
|
isLoading,
|
|
isSuccess: false,
|
|
}
|
|
} else {
|
|
return {
|
|
plan: data?.plan,
|
|
isLoading,
|
|
isSuccess,
|
|
}
|
|
}
|
|
}
|