import { Select } from "antd"; import { connect } from "dva"; import router from 'umi/router'; import { webSiteContactRelation } from "@/utils/utils" const SiteSelector = ({ siteList, currentSite, dispatch }) => { const handleChange = (value) => { dispatch({ type: "global/setCurrentSite", payload: value }); dispatch({ type: "global/setCurrentContactType", payload: webSiteContactRelation[value] }); }; return ( siteList.length ? ( ) : null ); }; export default connect(({ global }) => ({ siteList: global.siteList, currentSite: global.currentSite, }))(SiteSelector);