Skip to content

Commit

Permalink
Add Embed url to ShareModal (#5670)
Browse files Browse the repository at this point in the history
* feat(ShareModal): show embed url instead of editor url

* update contributors list
  • Loading branch information
cherniavskii committed Apr 20, 2021
1 parent a5bd211 commit c4d63de
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,15 @@
"contributions": [
"code"
]
},
{
"login": "cherniavskii",
"name": "Andrew Cherniavskii",
"avatar_url": "https://avatars.githubusercontent.com/u/13808724?v=4",
"profile": "http://cherniavskii.com",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,12 @@ Thanks goes to these wonderful people
<td align="center"><a href="https://saurabhdaware.in/"><img src="https://avatars1.githubusercontent.com/u/30949385?v=4" width="100px;" alt="Saurabh Daware"/><br /><sub><b>Saurabh Daware</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=saurabhdaware" title="Code">💻</a> <a href="#plugin-saurabhdaware" title="Plugin/utility libraries">🔌</a></td>
<td align="center"><a href="https://pablo.pink"><img src="https://avatars0.githubusercontent.com/u/4324982?v=4" width="100px;" alt="Pablo Varela"/><br /><sub><b>Pablo Varela</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=pablopunk" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/ryanpwaldon"><img src="https://avatars0.githubusercontent.com/u/12480362?v=4" width="100px;" alt="Ryan Waldon"/><br /><sub><b>Ryan Waldon</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=ryanpwaldon" title="Code">💻</a></td>
<td align="center"><a href="http://cherniavskii.com"><img src="https://avatars.githubusercontent.com/u/13808724?v=4" width="100px;" alt="Andrew Cherniavskii"/><br /><sub><b>Andrew Cherniavskii</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=cherniavskii" title="Code">💻</a></td>
</tr>
</table>

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

## Thanks
Expand Down
6 changes: 3 additions & 3 deletions packages/app/src/app/pages/common/Modals/ShareModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Files from 'embed/components/Sidebar/FileTree';
import React, { useEffect, useState } from 'react';

import { PaddedPreference } from './elements';
import { VIEW_OPTIONS, getEditorUrl, getIframeScript } from './getCode';
import { VIEW_OPTIONS, getEmbedUrl, getIframeScript } from './getCode';
import { SocialShare } from './SocialShare';

interface Props {}
Expand Down Expand Up @@ -198,10 +198,10 @@ export const ShareModal: React.FC<Props> = () => {
>
{copied ? 'Copied' : 'Copy Embed Code'}
</Button>
<Field label="Editor url (also works on Medium)">
<Field label="Embed url">
<Input
onFocus={select}
value={getEditorUrl(sandbox, mainModule, state)}
value={getEmbedUrl(sandbox, mainModule, state)}
readOnly
/>
</Field>
Expand Down

0 comments on commit c4d63de

Please sign in to comment.