import { NDKEvent, NDKPrivateKeySigner } from "@nostr-dev-kit/ndk"; import { LoaderIcon } from "@shared/icons"; import { ArrowRightCircleIcon } from "@shared/icons/arrowRightCircle"; import { RelayContext } from "@shared/relayProvider"; import { User } from "@shared/user"; import { dateToUnix } from "@utils/date"; import { useAccount } from "@utils/hooks/useAccount"; import { useContext, useState } from "react"; import { Link, useNavigate } from "react-router-dom"; export function OnboardingScreen() { const ndk = useContext(RelayContext); const navigate = useNavigate(); const { status, account } = useAccount(); const [loading, setLoading] = useState(false); const publish = async () => { try { setLoading(true); const event = new NDKEvent(ndk); const signer = new NDKPrivateKeySigner(account.privkey); ndk.signer = signer; event.content = "Running Lume, fighting for better future, join us here: https://lume.nu"; event.created_at = dateToUnix(); event.pubkey = account.pubkey; event.kind = 1; event.tags = []; // publish event event.publish(); // redirect to home setTimeout(() => navigate("/", { replace: true }), 1200); } catch (error) { console.log(error); } }; return (
You're a part of better future that we're fighting
If Lume gets your attention, please help us spread via button below
Running Lume, fighting for better future
join us here:{" "} https://lume.nu