From 69b5fefab43dd1e51160ed4ab769221d6cba94fe Mon Sep 17 00:00:00 2001 From: lianahus Date: Mon, 10 Oct 2022 15:29:00 +0200 Subject: [PATCH] added timeStum i --- .../home-tab/src/lib/components/homeTabFeatured.tsx | 8 -------- .../home-tab/src/lib/components/homeTabGetStarted.tsx | 5 +++-- libs/remix-ws-templates/src/templates/ozerc20/index.ts | 2 +- package.json | 1 + yarn.lock | 10 ---------- 5 files changed, 5 insertions(+), 21 deletions(-) diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx index 455ba5bd15..cf91b20d28 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx @@ -13,14 +13,6 @@ function HomeTabFeatured() { } }, []) - const openLink = (url = "") => { - if (url === "") { - window.open("https://remix-ide.readthedocs.io/en/latest/search.html?q=" + state.searchInput + "&check_keywords=yes&area=default", '_blank') - } else { - window.open(url, '_blank') - } - } - return (
diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx index ea6775af7f..bf2dbd7f01 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx @@ -21,8 +21,9 @@ function HomeTabGetStarted ({plugin}: HomeTabGetStartedProps) { const createWorkspace = async (templateName) => { await plugin.appManager.activatePlugin('filePanel') - - await plugin.call('filePanel', 'createWorkspace', templateName + "_workspace", templateName) + const timeStump = Date.now + await plugin.call('filePanel', 'createWorkspace', templateName + "_" + timeStump, templateName) + await plugin.call('filePanel', 'setWorkspace', templateName + "_" + timeStump) console.log("templateName ", templateName) plugin.verticalIcons.select('filePanel') _paq.push(['trackEvent', 'homeGetStarted', templateName]) diff --git a/libs/remix-ws-templates/src/templates/ozerc20/index.ts b/libs/remix-ws-templates/src/templates/ozerc20/index.ts index 529b11fc13..bf17c4ad60 100644 --- a/libs/remix-ws-templates/src/templates/ozerc20/index.ts +++ b/libs/remix-ws-templates/src/templates/ozerc20/index.ts @@ -22,6 +22,6 @@ export default async (opts) => { // If no options is selected, opts.upgradeable will be undefined // We do not show test file for upgradeable contract // @ts-ignore - if (opts.upgradeable === undefined || !opts.upgradeable) filesObj['tests/MyToken_test.sol'] = (await import('raw-loader!./tests/MyToken_test.sol')).default + if (opts && (opts.upgradeable === undefined || !opts.upgradeable)) filesObj['tests/MyToken_test.sol'] = (await import('raw-loader!./tests/MyToken_test.sol')).default return filesObj } \ No newline at end of file diff --git a/package.json b/package.json index 237207e2d3..d1d9451aa5 100644 --- a/package.json +++ b/package.json @@ -209,6 +209,7 @@ "react-dom": "^17.0.2", "react-draggable": "^4.4.4", "react-json-view": "^1.21.3", + "react-multi-carousel": "^2.8.2", "react-router-dom": "^6.3.0", "react-tabs": "^3.2.2", "regenerator-runtime": "0.13.7", diff --git a/yarn.lock b/yarn.lock index 8c96a184a1..b95abb0759 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4529,11 +4529,6 @@ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== -"@types/overlayscrollbars@^1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@types/overlayscrollbars/-/overlayscrollbars-1.12.1.tgz#fb637071b545834fb12aea94ee309a2ff4cdc0a8" - integrity sha512-V25YHbSoKQN35UasHf0EKD9U2vcmexRSp78qa8UglxFH8H3D+adEa9zGZwrqpH4TdvqeMrgMqVqsLB4woAryrQ== - "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" @@ -18094,11 +18089,6 @@ outpipe@^1.1.0: dependencies: shell-quote "^1.4.2" -overlayscrollbars-react@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/overlayscrollbars-react/-/overlayscrollbars-react-0.3.0.tgz#6d18e741897131643aa8afbc7fed735fbd106c9c" - integrity sha512-dV74p9VL/aImqJpeYz0vmpScZYu6UiNTmRKfyI4CS0OYUpYCUiTd723adY38Grz2W57hoNCECWDzkOJRFDQeZg== - p-cancelable@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa"