Logic for deep linking to go to the right tab and channel based on domain

This commit is contained in:
David Meza
2017-10-13 23:16:38 -05:00
parent 4aa33a127d
commit 150b829a67
3 changed files with 59 additions and 20 deletions

6
src/utils/util.js Normal file
View File

@@ -0,0 +1,6 @@
const REGEXP_DOMAIN = /(?:[^/]*\/){3}/;
export function getDomain(url) {
const matched = url.match(REGEXP_DOMAIN);
return matched ? matched[0] : null;
}