From efedfc786f034db3d08d950f88832f6a89271c53 Mon Sep 17 00:00:00 2001 From: EnixCoda Date: Sun, 29 Mar 2020 16:07:12 +0800 Subject: [PATCH] refactor: move copy file button --- src/{components => platforms/GitHub}/CopyFileButton.tsx | 2 +- src/platforms/GitHub/DOMHelper.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/{components => platforms/GitHub}/CopyFileButton.tsx (94%) diff --git a/src/components/CopyFileButton.tsx b/src/platforms/GitHub/CopyFileButton.tsx similarity index 94% rename from src/components/CopyFileButton.tsx rename to src/platforms/GitHub/CopyFileButton.tsx index 26040a8..ce124dd 100644 --- a/src/components/CopyFileButton.tsx +++ b/src/platforms/GitHub/CopyFileButton.tsx @@ -1,7 +1,7 @@ -import { getCodeElement } from 'platforms/GitHub/DOMHelper' import * as React from 'react' import { cx } from 'utils/cx' import { copyElementContent } from 'utils/DOMHelper' +import { getCodeElement } from './DOMHelper' type Props = {} diff --git a/src/platforms/GitHub/DOMHelper.ts b/src/platforms/GitHub/DOMHelper.ts index bab58bd..c53c4da 100644 --- a/src/platforms/GitHub/DOMHelper.ts +++ b/src/platforms/GitHub/DOMHelper.ts @@ -1,9 +1,9 @@ import { raiseError } from 'analytics' import { Clippy, ClippyClassName } from 'components/Clippy' -import { CopyFileButton, copyFileButtonClassName } from 'components/CopyFileButton' import * as React from 'react' import { $ } from 'utils/DOMHelper' import { renderReact } from 'utils/general' +import { CopyFileButton, copyFileButtonClassName } from './CopyFileButton' export function isInCodePage() { const branchListSelector = '#branch-select-menu.branch-select-menu'