From 21a18b64b0affa41eb79ea85712ce3f9c5f4b0ae Mon Sep 17 00:00:00 2001 From: vilm3r Date: Thu, 23 Jun 2022 19:04:28 -0500 Subject: [PATCH] chore: delete commented code --- src/pages/_app.tsx | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index bff7d05..674ffd6 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -1,42 +1,13 @@ import "../styles/global.css" import { AppProps } from "next/app" import { useEffect, useState } from "react" -// import { getRelays } from "../lib/localStorage" -// import { NostrEventType, NostrType } from "../types" export default function App({ Component, pageProps }: AppProps) { - // const [events, setEvents] = useState<{ [k: string]: NostrEventType }>({}) - // const [nostr, setNostr] = useState({ - // priv: "", - // pub: "", - // pool: null, - // sub: null, - // }) const [keys, setKeys] = useState<{ pub: string priv: string } | null>(null) - // const updateEvents = async (pub: string, priv: string, event: NostrEventType) => { - // const { decrypt } = await import("nostr-tools/nip04") - // try { - // const p = event.tags.find(([tag]) => tag === "p") || ["p", ""] - // const pubkey = event.pubkey === pub ? p[1] : event.pubkey - // const message = decrypt(priv, pubkey, event.content) - // setEvents({ - // ...events, - // ...{ - // [event.id]: { - // ...event, - // message, - // }, - // }, - // }) - // } catch (e) { - // console.warn(e) - // } - // } - useEffect(() => { void (async () => { const { generatePrivateKey, getPublicKey } = await import("nostr-tools") @@ -46,12 +17,5 @@ export default function App({ Component, pageProps }: AppProps) { })() }, []) - // const getLatestEvent = (events: Record) => - // Object.entries(events).reduce((acc, x) => { - // if (acc === null) return x[1] - // if (new Date(acc.created_at) < new Date(x[1].created_at)) return x[1] - // return acc - // }, null as NostrEventType | null) - return }