All files / src/hooks/onboarding utils.ts

40% Statements 2/5
0% Branches 0/4
0% Functions 0/1
40% Lines 2/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20482x                   482x                  
export const SignupType = {
  GIVEPAYMENTS_WEBSITE: "givepayments_website", //for enterprise
  ENTERPRISE_WEBSITE: "enterprise_website", //if it is from enterprise website
  ACQUIRER_CREATED: "acquirer_created", //in side panel if the logged in is an acquirer
  ACQUIRER_IMPORTED: "acquirer_imported",
  ENTERPRISE_CREATED: "enterprise_created", //in side panel if the logged in is an enterprise
  ENTERPRISE_IMPORTED: "enterprise_imported",
  DEVELOPER_API: "developer_api",
};
 
export const isEnterpriseWebsite = () => {
  const pathname = window.location.href;
  const isEnterprise =
    !pathname.startsWith("https://portal.givepayments.") &&
    !pathname.startsWith("https://portal.staging.") &&
    !pathname.startsWith("https://portal.development.") &&
    !pathname.startsWith("https://local.");
  return isEnterprise;
};