diff --git a/apps/desktop2/src/components/login.tsx b/apps/desktop2/src/components/login.tsx index 0d8cf6f2..9d644512 100644 --- a/apps/desktop2/src/components/login.tsx +++ b/apps/desktop2/src/components/login.tsx @@ -11,19 +11,15 @@ export function LoginDialog() { const [nsec, setNsec] = useState(""); const [passphase, setPassphase] = useState(""); - const [loading, setLoading] = useState(false); const login = async () => { try { - setLoading(true); - const save = await ark.save_account(nsec, passphase); if (save) { navigate({ to: "/", search: { guest: false } }); } } catch (e) { - setLoading(false); toast.error(String(e)); } }; diff --git a/apps/desktop2/src/routes/nwc.lazy.tsx b/apps/desktop2/src/routes/nwc.lazy.tsx new file mode 100644 index 00000000..ade7af10 --- /dev/null +++ b/apps/desktop2/src/routes/nwc.lazy.tsx @@ -0,0 +1,62 @@ +import { useArk } from "@lume/ark"; +import { ArrowRightIcon, ZapIcon } from "@lume/icons"; +import { Container } from "@lume/ui"; +import { createLazyFileRoute } from "@tanstack/react-router"; +import { useState } from "react"; + +export const Route = createLazyFileRoute("/nwc")({ + component: Screen, +}); + +function Screen() { + const ark = useArk(); + + const [uri, setUri] = useState(""); + const [isDone, setIsDone] = useState(false); + + const save = async () => { + const nwc = await ark.set_nwc(uri); + + if (nwc) { + setIsDone(true); + } + }; + + return ( + +
+
+
+ +
+
+

+ Connect bitcoin wallet to + start zapping to your favorite content and creator. +

+
+
+
+
+ +