import {useEffect, useState} from "react";
import Taro from '@tarojs/taro'
import {View, RichText} from '@tarojs/components'

const Agreement = () => {

  const [content, setContent] = useState<any>('')
  const reload = () => {
    Taro.hideTabBar()
    setContent('<p>' +
      '<span style="font-size: 14px;">欢迎使用</span>' +
      '<span style="font-size: 14px;">&nbsp;</span>' +
      '<span style="font-size: 14px;"><strong><span style="color: rgb(255, 0, 0);">【WebSoft】</span></strong></span>' +
      '<span style="font-size: 14px;">服务协议&nbsp;</span>' +
      '</p>')
  }

  useEffect(() => {
    reload()
  }, [])

  return (
    <>
      <View className={'content text-gray-700 text-sm p-4'}>
        <RichText nodes={content}/>
      </View>
    </>
  )
}
export default Agreement
