mirror of
https://github.com/documenso/documenso.git
synced 2025-11-17 10:11:35 +10:00
12 lines
380 B
TypeScript
12 lines
380 B
TypeScript
import { WEBAPP_BASE_URL } from '../constants/app';
|
|
|
|
export const formatTeamUrl = (teamUrl: string, baseUrl?: string) => {
|
|
const formattedBaseUrl = (baseUrl ?? WEBAPP_BASE_URL).replace(/https?:\/\//, '');
|
|
|
|
return `${formattedBaseUrl}/t/${teamUrl}`;
|
|
};
|
|
|
|
export const formatDocumentsPath = (teamUrl?: string) => {
|
|
return teamUrl ? `/t/${teamUrl}/documents` : '/documents';
|
|
};
|