Logic for deep linking to go to the right tab and channel based on domain
This commit is contained in:
6
src/utils/util.js
Normal file
6
src/utils/util.js
Normal file
@@ -0,0 +1,6 @@
|
||||
const REGEXP_DOMAIN = /(?:[^/]*\/){3}/;
|
||||
|
||||
export function getDomain(url) {
|
||||
const matched = url.match(REGEXP_DOMAIN);
|
||||
return matched ? matched[0] : null;
|
||||
}
|
Reference in New Issue
Block a user