import { View } from "@tarojs/components";
import AgentSettingList from './components/AgentSettingList'
import AgentKnowledgeLib from './components/AgentKnowledgeLib'
import AgentCard from './components/AgentCard'
import AgentContactCard from './components/AgentContactCard'

import React, { useEffect, useState } from "react";
import { useAgentStore } from "@/store/agentStore";


export default React.memo(function Index() {
  console.log('agent setting')
  const {fetchAgents} = useAgentStore()  

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

  return (
    <View>
      <AgentCard></AgentCard>
      <View className="mb-20">
        <AgentContactCard></AgentContactCard>
      </View>
      <AgentSettingList></AgentSettingList>
      <View className="py-20">
        <AgentKnowledgeLib></AgentKnowledgeLib>
      </View>
    </View>
  );
})
