Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

482 B
Raw Blame
export const createNextcloudCalendarServerUrl = (integrationUrl: string) => {
  const calendarServerUrl = new URL(integrationUrl);
  const integrationPath = calendarServerUrl.pathname.replace(/\/+$/, "");
  const davPath = "/remote.php/dav";

  calendarServerUrl.pathname = integrationPath.endsWith(davPath)
    ? `${integrationPath}/`
    : `${integrationPath}${davPath}/`;
  calendarServerUrl.search = "";
  calendarServerUrl.hash = "";

  return calendarServerUrl.toString();
};