"use client";
import React, { useState } from "react";
import PointsRuleModal from "@/components/customer/PointsRule";
export default function PointsRule() {
  // 控制弹窗显隐的状态
  const [isModalOpen, setIsModalOpen] = useState(false);

  // 打开弹窗（页面点击触发）
  const ruleClick = () => {
    console.log("aaaa");
    setIsModalOpen(true);
  };
  return (
    <>
      <div
        onClick={ruleClick}
        className="text-black text-sm font-medium underline"
      >
        Rules
      </div>
      {/* 积分规则组件 */}
      <PointsRuleModal
        visible={isModalOpen}
        handleCloseModal={() => setIsModalOpen(false)}
      />
    </>
  );
}
