import { useEffect, useState } from "react"; import api from "../helpers/api"; import Only from "./common/OnlyWhen"; import { showDialog } from "./Dialog"; import "../less/about-site-dialog.less"; interface Props extends DialogProps {} const AboutSiteDialog: React.FC = ({ destroy }: Props) => { const [profile, setProfile] = useState(); useEffect(() => { try { api.getSystemStatus().then(({ profile }) => { setProfile(profile); }); } catch (error) { setProfile({ mode: "dev", version: "0.0.0", }); } }, []); const handleCloseBtnClick = () => { destroy(); }; return ( <>

🤠About Memos

Memos is an open source, quickly self-hosted alternative to flomo.


🏗 Source code, and built by Steven 🐯.

version: {profile?.version} 🎉

); }; export default function showAboutSiteDialog(): void { showDialog( { className: "about-site-dialog", }, AboutSiteDialog ); }