Files
cal.diy/apps/web/modules/onboarding/organization/migrate-teams/utils.ts
T
sean-brydon a359f0ba01 feat: organization upgrade flow v3 (#25972)
* wip flow

* add tests

* WIP migrateing view

* push back step

* fix tests and logic for adding new members to existing teams

* few UI fixes

* type fixes

* fix nits

* few UI + re-route fixes

* fix teamId when migrating
2026-01-26 17:03:12 +01:00

16 lines
311 B
TypeScript

export const getSuggestedSlug = ({
teamSlug,
orgSlug,
}: {
teamSlug: string | null;
orgSlug: string | null;
}) => {
// If there is no orgSlug, we can't suggest a slug
if (!teamSlug || !orgSlug) {
return teamSlug;
}
return teamSlug.replace(`${orgSlug}-`, "").replace(`-${orgSlug}`, "");
};