"use client"; import React,{useState,useEffect} from "react"; import { Image ,Toast} from "antd-mobile"; import { get,save } from "@/utils/storeInfo"; export default function AddToHome() { const [firstLogin, setFirstLogin] = useState("0"); useEffect(() => { if(!(("standalone" in window.navigator) && window.navigator.standalone) ){ setFirstLogin(get("firstLogin")) } }, []); return ( firstLogin=="1"?
{save("firstLogin", 0);setFirstLogin("0")}} >
点击 添加到主屏幕
:null ); }