* 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
16 lines
311 B
TypeScript
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}`, "");
|
|
};
|
|
|