import React, { useEffect, useState } from "react";
import styles from "./index.module.scss";
import { useLocation } from "react-router-dom";
import history from "@/utils/history";
import { useSelector } from "react-redux";
import { RootState } from "@/store";
function B1Village() {
  const location = useLocation();

  const [uId, setUid] = useState("");

  const architec = useSelector(
    (state: RootState) => state.A0Layout.dataAll.architec
  );

 

  const [data,setData] =useState({
    id:Number
  })

  useEffect(() => {
    const query = new URLSearchParams(location.search);
    const param = query.get("id");
    console.log("村落页面获取id", param);
    setUid(param!);
  }, [location.search]);

  return (
    <div className={styles.B1Village}>
      {/* 右下角的详情按钮 */}
      <div
        className="B1toTab3"
        onClick={() => history.push(`/architec?id=${uId}`)}
      >
        详情
      </div>
    </div>
  );
}

const MemoB1Village = React.memo(B1Village);

export default MemoB1Village;
