Merge pull request #2971 from ethereum/yann300-patch-41

matomo: click on run from editor
pull/2973/head
bunsenstraat 2 years ago committed by GitHub
commit ff8ad82711
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx

@ -5,6 +5,7 @@ import React, { useState, useRef, useEffect, useReducer } from 'react' // eslint
import { OverlayTrigger, Tooltip } from 'react-bootstrap' // eslint-disable-line import { OverlayTrigger, Tooltip } from 'react-bootstrap' // eslint-disable-line
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs' import { Tab, Tabs, TabList, TabPanel } from 'react-tabs'
import './remix-ui-tabs.css' import './remix-ui-tabs.css'
const _paq = window._paq = window._paq || []
/* eslint-disable-next-line */ /* eslint-disable-next-line */
export interface TabsUIProps { export interface TabsUIProps {
@ -152,8 +153,10 @@ export const TabsUI = (props: TabsUIProps) => {
const content = await props.plugin.call('fileManager', "readFile", path) const content = await props.plugin.call('fileManager', "readFile", path)
if (tabsState.currentExt === 'js' || tabsState.currentExt === 'ts') { if (tabsState.currentExt === 'js' || tabsState.currentExt === 'ts') {
await props.plugin.call('scriptRunner', 'execute', content) await props.plugin.call('scriptRunner', 'execute', content)
_paq.push(['trackEvent', 'editor', 'clickRunFromEditor', tabsState.currentExt])
} else if (tabsState.currentExt === 'sol' || tabsState.currentExt === 'yul') { } else if (tabsState.currentExt === 'sol' || tabsState.currentExt === 'yul') {
await props.plugin.call('solidity', 'compile', path) await props.plugin.call('solidity', 'compile', path)
_paq.push(['trackEvent', 'editor', 'clickRunFromEditor', tabsState.currentExt])
} }
}} }}
> >

Loading…
Cancel
Save