import Taro, { useLoad } from '@tarojs/taro'
import React from 'react'
import { View } from '@tarojs/components'
import './index.less'

const myPluginInterface = Taro.requirePlugin('myPlugin')

const Index: React.FC = () => {
  useLoad(() => {
  })

  function openEmbeddedMiniProgram(appId, path) {
    Taro.openEmbeddedMiniProgram({
      appId,
      path,
      envVersion: 'trial'
    })
  }

  return (
    <View className='index'>
      <custom props={{ openEmbeddedMiniProgram, adpId: 'uh2321awe1' }}/>
    </View>
  )
}

export default Index
