Smaller quick-fixes for app-js (#756)
* Fix wrong copyToClipboard link * Removed duplicate 'js--App' wrapper * Fixed overflow in editor for longer code examples
This commit is contained in:
parent
3acd9c16c2
commit
b56480c9ca
@ -315,7 +315,11 @@ class Playground extends React.PureComponent<Props, State> {
|
||||
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 => {
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -17,12 +17,10 @@ class AppJs extends React.PureComponent<Props> {
|
||||
const { basePath } = this.props;
|
||||
|
||||
return (
|
||||
<main className='js--App'>
|
||||
<Switch>
|
||||
<Route path={`${basePath}/share/:base64`} component={Playground} />
|
||||
<Route component={Playground} />
|
||||
</Switch>
|
||||
</main>
|
||||
<Switch>
|
||||
<Route path={`${basePath}/share/:base64`} component={Playground} />
|
||||
<Route component={Playground} />
|
||||
</Switch>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user