feat: add custom domain to domain button
This commit is contained in:
@@ -35,16 +35,20 @@ export const isOrgAdmin = derived(currentOrg, ($currentOrg) => $currentOrg.role_
|
|||||||
export const currentOrgPlan = derived(currentOrg, ($currentOrg) =>
|
export const currentOrgPlan = derived(currentOrg, ($currentOrg) =>
|
||||||
$currentOrg.organization_plan.find((p) => p.is_active)
|
$currentOrg.organization_plan.find((p) => p.is_active)
|
||||||
);
|
);
|
||||||
|
|
||||||
export const currentOrgPath = derived(currentOrg, ($currentOrg) =>
|
export const currentOrgPath = derived(currentOrg, ($currentOrg) =>
|
||||||
$currentOrg.siteName ? `/org/${$currentOrg.siteName}` : ''
|
$currentOrg.siteName ? `/org/${$currentOrg.siteName}` : ''
|
||||||
);
|
);
|
||||||
|
|
||||||
export const currentOrgDomain = derived(currentOrg, ($currentOrg) => {
|
export const currentOrgDomain = derived(currentOrg, ($currentOrg) => {
|
||||||
const browserOrigin = dev && browser && window.location.origin;
|
const browserOrigin = dev && browser && window.location.origin;
|
||||||
return browserOrigin
|
return browserOrigin
|
||||||
? browserOrigin
|
? browserOrigin
|
||||||
: $currentOrg.siteName
|
: $currentOrg.customDomain && $currentOrg.isCustomDomainVerified
|
||||||
? `https://${$currentOrg.siteName}.classroomio.com`
|
? `https://${$currentOrg.customDomain}`
|
||||||
: '';
|
: $currentOrg.siteName
|
||||||
|
? `https://${$currentOrg.siteName}.classroomio.com`
|
||||||
|
: '';
|
||||||
});
|
});
|
||||||
|
|
||||||
// Utility org store
|
// Utility org store
|
||||||
|
|||||||
Reference in New Issue
Block a user