From b56480c9ca0fccc7cf68d9c672ac10104608dfb9 Mon Sep 17 00:00:00 2001 From: Stefanie Doll Date: Sun, 24 Feb 2019 13:33:44 +0100 Subject: [PATCH] Smaller quick-fixes for app-js (#756) * Fix wrong copyToClipboard link * Removed duplicate 'js--App' wrapper * Fixed overflow in editor for longer code examples --- packages/app-js/src/Playground.tsx | 6 +++++- packages/app-js/src/index.css | 1 - packages/app-js/src/index.tsx | 10 ++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/app-js/src/Playground.tsx b/packages/app-js/src/Playground.tsx index 7e6b3b5cdf..db6a32fc18 100644 --- a/packages/app-js/src/Playground.tsx +++ b/packages/app-js/src/Playground.tsx @@ -315,7 +315,11 @@ class Playground extends React.PureComponent { history.push(path); } - this.copyToClipboard(`${window.location.origin}/#${path}`); + const basePath = window.location.pathname.replace('/', '').length > 0 + ? `${window.location.origin}/${window.location.pathname.replace('/', '')}` + : `${window.location.origin}`; + + this.copyToClipboard(`${basePath}/#${path}`); } private copyToClipboard = (link: string): void => { diff --git a/packages/app-js/src/index.css b/packages/app-js/src/index.css index ecea998087..0649eadb90 100644 --- a/packages/app-js/src/index.css +++ b/packages/app-js/src/index.css @@ -64,7 +64,6 @@ .codeflask--has-line-numbers .codeflask__flatten { font-size: 12px; - height: 99.99%; line-height: 18px; min-width: calc(100% - 40px); width: auto; diff --git a/packages/app-js/src/index.tsx b/packages/app-js/src/index.tsx index 2a62217746..95e97688a5 100644 --- a/packages/app-js/src/index.tsx +++ b/packages/app-js/src/index.tsx @@ -17,12 +17,10 @@ class AppJs extends React.PureComponent { const { basePath } = this.props; return ( -
- - - - -
+ + + + ); } }