Skip to content

The open alternative to Salesforce, designed for AI.

352 B
Raw Blame
import { useIsCurrentLocationOnAWorkspace } from '@/domain-manager/hooks/useIsCurrentLocationOnAWorkspace';

export const useReadWorkspaceUrlFromCurrentLocation = () => {
  const { isOnAWorkspace } = useIsCurrentLocationOnAWorkspace();

  return {
    currentLocationHostname: isOnAWorkspace
      ? window.location.hostname
      : undefined,
  };
};