style(supabase): prettier pass on the new TypeScript files
This commit is contained in:
1 parent
d239374d81
commit
ab04b2e43d
9 files changed
+70
-27
No files matched your search
@@ -54,17 +54,29 @@ export function resolveSupabaseConnection(
|
||||
const cleanKey = nonEmpty(anonKey)
|
||||
if (cleanUrl && cleanKey) return { url: cleanUrl, anonKey: cleanKey }
|
||||
if ((cleanUrl || cleanKey) && import.meta.env.DEV) {
|
||||
console.warn('[config] supabaseUrl and supabaseAnonKey must be set together; Supabase disabled')
|
||||
console.warn(
|
||||
'[config] supabaseUrl and supabaseAnonKey must be set together; Supabase disabled',
|
||||
)
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
export function resolveConfig(runtime: RuntimeConfig = {}): AppConfig {
|
||||
return {
|
||||
siteName: runtime.siteName ?? import.meta.env.VITE_APP_SITE_NAME ?? DEFAULTS.siteName,
|
||||
brandName: runtime.brandName ?? import.meta.env.VITE_APP_BRAND_NAME ?? DEFAULTS.brandName,
|
||||
footerName: runtime.footerName ?? import.meta.env.VITE_APP_FOOTER_NAME ?? DEFAULTS.footerName,
|
||||
tagline: runtime.tagline ?? import.meta.env.VITE_APP_TAGLINE ?? DEFAULTS.tagline,
|
||||
siteName:
|
||||
runtime.siteName ??
|
||||
import.meta.env.VITE_APP_SITE_NAME ??
|
||||
DEFAULTS.siteName,
|
||||
brandName:
|
||||
runtime.brandName ??
|
||||
import.meta.env.VITE_APP_BRAND_NAME ??
|
||||
DEFAULTS.brandName,
|
||||
footerName:
|
||||
runtime.footerName ??
|
||||
import.meta.env.VITE_APP_FOOTER_NAME ??
|
||||
DEFAULTS.footerName,
|
||||
tagline:
|
||||
runtime.tagline ?? import.meta.env.VITE_APP_TAGLINE ?? DEFAULTS.tagline,
|
||||
supabase: resolveSupabaseConnection(
|
||||
runtime.supabaseUrl ?? import.meta.env.VITE_SUPABASE_URL,
|
||||
runtime.supabaseAnonKey ?? import.meta.env.VITE_SUPABASE_ANON_KEY,
|
||||
|
||||
Reference in new issue
Block a user