summaryrefslogtreecommitdiffstats
path: root/webapp/utils/url.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/utils/url.jsx')
-rw-r--r--webapp/utils/url.jsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/webapp/utils/url.jsx b/webapp/utils/url.jsx
index 9fe00da6f..6307814f2 100644
--- a/webapp/utils/url.jsx
+++ b/webapp/utils/url.jsx
@@ -9,11 +9,12 @@ export function cleanUpUrlable(input) {
return cleaned;
}
-export function getShortenedTeamURL(teamURL = '') {
- if (teamURL.length > 35) {
- return teamURL.substring(0, 10) + '...' + teamURL.substring(teamURL.length - 12, teamURL.length) + '/';
+export function getShortenedURL(url = '', getLength = 27) {
+ if (url.length > 35) {
+ const subLength = getLength - 14;
+ return url.substring(0, 10) + '...' + url.substring(url.length - subLength, url.length) + '/';
}
- return teamURL + '/';
+ return url + '/';
}
export function getSiteURL() {