import Taro from "@tarojs/taro"
import { useEffect } from "react"

export const reportPageVisit = () => {
  useEffect(()=> {
    Taro.reportEvent('page_visit', {
      
    })
  }, [])
}
export const reportProfilePage = (profileId?:string, name?: string) => {
  useEffect(()=> {
    if(!profileId || !name){
      return;  
    }
    Taro.reportEvent('xiaolvye_visit', {
      nickname: name,
      profile_id: profileId,
    })
  }, [profileId, name])
}
export const reportClicked = (element: string) => {
  Taro.reportEvent('clicked', {
    element
  })
}