MCPcopy Index your code
hub / github.com/simstudioai/sim / getBrandConfig

Function getBrandConfig

apps/sim/ee/whitelabeling/branding.ts:25–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23 * Supports runtime configuration via Docker/Kubernetes
24 */
25export const getBrandConfig = (): BrandConfig => {
26 const hasCustomBrand = Boolean(
27 getEnv('NEXT_PUBLIC_BRAND_NAME') ||
28 getEnv('NEXT_PUBLIC_BRAND_LOGO_URL') ||
29 getEnv('NEXT_PUBLIC_BRAND_WORDMARK_URL') ||
30 getEnv('NEXT_PUBLIC_BRAND_PRIMARY_COLOR')
31 )
32
33 return {
34 name: getEnv('NEXT_PUBLIC_BRAND_NAME') || defaultBrandConfig.name,
35 logoUrl: getEnv('NEXT_PUBLIC_BRAND_LOGO_URL') || defaultBrandConfig.logoUrl,
36 wordmarkUrl: getEnv('NEXT_PUBLIC_BRAND_WORDMARK_URL') || defaultBrandConfig.wordmarkUrl,
37 faviconUrl: getEnv('NEXT_PUBLIC_BRAND_FAVICON_URL') || defaultBrandConfig.faviconUrl,
38 customCssUrl: getEnv('NEXT_PUBLIC_CUSTOM_CSS_URL') || defaultBrandConfig.customCssUrl,
39 supportEmail: getEnv('NEXT_PUBLIC_SUPPORT_EMAIL') || defaultBrandConfig.supportEmail,
40 documentationUrl:
41 getEnv('NEXT_PUBLIC_DOCUMENTATION_URL') || defaultBrandConfig.documentationUrl,
42 termsUrl: getEnv('NEXT_PUBLIC_TERMS_URL') || defaultBrandConfig.termsUrl,
43 privacyUrl: getEnv('NEXT_PUBLIC_PRIVACY_URL') || defaultBrandConfig.privacyUrl,
44 theme: getThemeColors(),
45 isWhitelabeled: hasCustomBrand,
46 }
47}
48
49/**
50 * Hook to use brand configuration in React components

Callers 15

BrandedLayoutFunction · 0.90
getEmailSubjectFunction · 0.90
getLimitEmailSubjectFunction · 0.90
EmailFooterFunction · 0.90
EmailLayoutFunction · 0.90
OTPVerificationEmailFunction · 0.90
ResetPasswordEmailFunction · 0.90
ExistingAccountEmailFunction · 0.90
WelcomeEmailFunction · 0.90
WorkspaceAddedEmailFunction · 0.90
WorkspaceInvitationEmailFunction · 0.90
BatchInvitationEmailFunction · 0.90

Calls 2

getEnvFunction · 0.90
getThemeColorsFunction · 0.85

Tested by

no test coverage detected