|
|
@ -34,11 +34,23 @@ function HomeTabLearn ({plugin}: HomeTabLearnProps) { |
|
|
|
const startLearnEthTutorial = async (tutorial: 'home' | 'basics' | 'soliditybeginner' | 'deploylibraries') => { |
|
|
|
const startLearnEthTutorial = async (tutorial: 'home' | 'basics' | 'soliditybeginner' | 'deploylibraries') => { |
|
|
|
await plugin.appManager.activatePlugin(['solidity', 'LearnEth', 'solidityUnitTesting']) |
|
|
|
await plugin.appManager.activatePlugin(['solidity', 'LearnEth', 'solidityUnitTesting']) |
|
|
|
plugin.verticalIcons.select('LearnEth') |
|
|
|
plugin.verticalIcons.select('LearnEth') |
|
|
|
tutorial === 'home' ? plugin.call('LearnEth') : |
|
|
|
tutorial === 'home' ? plugin.call('LearnEth', 'home') : |
|
|
|
plugin.call('LearnEth', 'startTutorial', 'ethereum/remix-workshops', 'master', tutorial) |
|
|
|
plugin.call('LearnEth', 'startTutorial', 'ethereum/remix-workshops', 'master', tutorial) |
|
|
|
_paq.push(['trackEvent', 'hometab', 'startLearnEthTutorial', tutorial]) |
|
|
|
_paq.push(['trackEvent', 'hometab', 'startLearnEthTutorial', tutorial]) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const goToLearnEthHome = async () => { |
|
|
|
|
|
|
|
console.log({ plugin }) |
|
|
|
|
|
|
|
if(plugin.appManager.isActive('LearnEth')) { |
|
|
|
|
|
|
|
plugin.verticalIcons.select('LearnEth') |
|
|
|
|
|
|
|
await plugin.call('LearnEth', 'home') |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
await plugin.appManager.activatePlugin(['learnEth', 'solidity', 'solidityUnitTesting']) |
|
|
|
|
|
|
|
plugin.verticalIcons.select('LearnEth') |
|
|
|
|
|
|
|
await plugin.call('LearnEth', 'home') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div className="d-flex px-2 pb-2 pt-2 d-flex flex-column" id="hTLearnSection"> |
|
|
|
<div className="d-flex px-2 pb-2 pt-2 d-flex flex-column" id="hTLearnSection"> |
|
|
|
<div className="d-flex justify-content-between"> |
|
|
|
<div className="d-flex justify-content-between"> |
|
|
@ -47,7 +59,7 @@ function HomeTabLearn ({plugin}: HomeTabLearnProps) { |
|
|
|
</label> |
|
|
|
</label> |
|
|
|
<button |
|
|
|
<button |
|
|
|
onClick={ async () => { |
|
|
|
onClick={ async () => { |
|
|
|
await startLearnEthTutorial('home') |
|
|
|
await goToLearnEthHome() |
|
|
|
}} |
|
|
|
}} |
|
|
|
className="h-100 px-2 pt-0 btn" |
|
|
|
className="h-100 px-2 pt-0 btn" |
|
|
|
> |
|
|
|
> |
|
|
|