summaryrefslogtreecommitdiff
path: root/source/features/remove-projects-tab.tsx
diff options
context:
space:
mode:
authorGravatar Fregante <opensource@bfred.it> 2020-05-08 01:42:40 +0200
committerGravatar GitHub <noreply@github.com> 2020-05-08 01:42:40 +0200
commita24d9460d36e5147f5a9f389923f2eb75f34e34f (patch)
treedb2f1253ae14d3af1c842af66c318caa760401d4 /source/features/remove-projects-tab.tsx
parent90b43ae76d84b53eb01a1d8961907c515c010994 (diff)
downloadrefined-github-a24d9460d36e5147f5a9f389923f2eb75f34e34f.tar.gz
refined-github-a24d9460d36e5147f5a9f389923f2eb75f34e34f.tar.zst
refined-github-a24d9460d36e5147f5a9f389923f2eb75f34e34f.zip
Extract page-detect.ts into `github-url-detection` (#3062)
Diffstat (limited to 'source/features/remove-projects-tab.tsx')
-rw-r--r--source/features/remove-projects-tab.tsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/features/remove-projects-tab.tsx b/source/features/remove-projects-tab.tsx
index 0f083577..94179707 100644
--- a/source/features/remove-projects-tab.tsx
+++ b/source/features/remove-projects-tab.tsx
@@ -2,18 +2,17 @@ import React from 'dom-chef';
import select from 'select-dom';
import onetime from 'onetime';
import elementReady from 'element-ready';
+import * as pageDetect from 'github-url-detection';
import features from '../libs/features';
-import * as pageDetect from '../libs/page-detect';
-import {isUserProfile, isOwnOrganizationProfile, isOrganizationProfile} from '../libs/page-detect';
const addNewProjectLink = onetime(() => {
- if (isUserProfile()) {
+ if (pageDetect.isUserProfile()) {
// The link already exists on our profile,
// and we can't create projects on others' profiles
return;
}
- if (isOrganizationProfile() && !isOwnOrganizationProfile()) {
+ if (pageDetect.isOrganizationProfile() && !pageDetect.isOwnOrganizationProfile()) {
// We can only add projects to our organizations
return;
}