diff options
Diffstat (limited to 'source/helpers/add-after-branch-selector.tsx')
-rw-r--r-- | source/helpers/add-after-branch-selector.tsx | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/source/helpers/add-after-branch-selector.tsx b/source/helpers/add-after-branch-selector.tsx deleted file mode 100644 index 5ed5d35a..00000000 --- a/source/helpers/add-after-branch-selector.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'dom-chef'; -import select from 'select-dom'; -import elementReady from 'element-ready'; - -import {wrapAll} from './dom-utils.js'; - -export default async function addAfterBranchSelector(button: Element): Promise<void> { - button.classList.add('ml-2'); - const branchSelector = (await elementReady('#branch-select-menu', {waitForChildren: false}))!; - const branchSelectorWrapper = branchSelector.closest('.position-relative')!; - const breadcrumb = select('.breadcrumb'); - if (!breadcrumb) { - branchSelectorWrapper.after(button); - return; - } - - branchSelectorWrapper.append(button); - if (branchSelector.classList.contains('rgh-wrapper-added')) { - return; - } - - breadcrumb.classList.add('flex-shrink-0'); - breadcrumb.classList.remove('mt-3'); - branchSelector.classList.add('rgh-wrapper-added'); - branchSelectorWrapper.classList.add('d-flex', 'flex-shrink-0'); - wrapAll([branchSelectorWrapper, breadcrumb], <div className="d-flex flex-wrap flex-1 mr-2" style={{rowGap: '16px'}}/>); -} |