import { useSyncExternalStore } from "react"; import { FormattedMessage } from "react-intl"; import { Link } from "react-router-dom"; import { ZapPoolTarget } from "@/Pages/ZapPool/ZapPoolTarget"; import { bech32ToHex, unwrap } from "@/Utils"; import { SnortPubKey } from "@/Utils/Const"; import { ZapPoolController, ZapPoolRecipientType } from "@/Utils/ZapPoolController"; export function ZapPoolDonateSection() { if (!CONFIG.features.zapPool) { return; } // eslint-disable-next-line react-hooks/rules-of-hooks const zapPool = useSyncExternalStore( c => unwrap(ZapPoolController).hook(c), () => unwrap(ZapPoolController).snapshot(), ); return ( <>