Skip to content

Commit

Permalink
[docs] Remove StackBlitz
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Nov 22, 2020
1 parent 2b942e5 commit 80c7951
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
31 changes: 0 additions & 31 deletions docs/src/modules/components/DemoToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,27 +308,6 @@ export default function DemoToolbar(props) {
}
};

const handleStackBlitzClick = () => {
const demoConfig = getDemoConfig(demoData);
const form = document.createElement('form');
form.method = 'POST';
form.target = '_blank';
form.action = 'https://stackblitz.com/run';
addHiddenInput(form, 'project[template]', 'javascript');
addHiddenInput(form, 'project[title]', demoConfig.title);
addHiddenInput(form, 'project[description]', demoConfig.description);
addHiddenInput(form, 'project[dependencies]', JSON.stringify(demoConfig.dependencies));
addHiddenInput(form, 'project[devDependencies]', JSON.stringify(demoConfig.devDependencies));
Object.keys(demoConfig.files).forEach((key) => {
const value = demoConfig.files[key];
addHiddenInput(form, `project[files][${key}]`, value);
});
document.body.appendChild(form);
form.submit();
document.body.removeChild(form);
handleMoreClose();
};

const createHandleCodeSourceLink = (anchor) => async () => {
try {
await copy(`${window.location.href.split('#')[0]}#${anchor}`);
Expand Down Expand Up @@ -525,16 +504,6 @@ export default function DemoToolbar(props) {
>
{t('viewGitHub')}
</MenuItem>
{demoOptions.hideEditButton ? null : (
<MenuItem
data-ga-event-category="demo"
data-ga-event-label={demoOptions.demo}
data-ga-event-action="stackblitz"
onClick={handleStackBlitzClick}
>
{t('stackblitz')}
</MenuItem>
)}
<MenuItem
data-ga-event-category="demo"
data-ga-event-label={demoOptions.demo}
Expand Down
1 change: 0 additions & 1 deletion docs/translations/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"skipToContent": "Skip to content",
"sourceCode": "Source code",
"spacingUnit": "Spacing unit",
"stackblitz": "Edit in StackBlitz (JS only)",
"stars": "GitHub stars",
"stickyFooterDescr": "Attach a footer to the bottom of the viewport when page content is short.",
"stickyFooterTitle": "Sticky footer",
Expand Down

0 comments on commit 80c7951

Please sign in to comment.