export function getBaseDomain(url) {
    const urlObject = new URL(url);
    const hostname = urlObject.hostname;
    if (hostname.endsWith('komi.io')) {
        return 'komi.io';
    }
    if (hostname.endsWith('komi.ci')) {
        const [CI, KOMI, env] = hostname.split('.').reverse();
        return `${env}.${KOMI}.${CI}`;
    }
    return null;
}
