import { useEffect, useState } from "react"; import { useGlobalStore } from "@/store/module"; import Icon from "./Icon"; interface State { show: boolean; } const DemoBanner: React.FC = () => { const globalStore = useGlobalStore(); const profile = globalStore.state.systemStatus.profile; const [state, setState] = useState({ show: false, }); useEffect(() => { const isDemo = profile.mode === "demo"; setState({ show: isDemo, }); }, []); if (!state.show) return null; return (
✨ A lightweight, self-hosted memo hub. Open Source and Free forever. ✨ Install
); }; export default DemoBanner;