import { fetchNip05Pubkey } from "@snort/shared";
import { NostrPrefix, tryParseNostrLink } from "@snort/system";
import React, { useEffect, useState } from "react";
import { FormattedMessage } from "react-intl";
import { useLocation, useParams } from "react-router-dom";
import { ThreadRoute } from "@/Components/Event/Thread";
import { GenericFeed } from "@/Components/Feed/Generic";
import Spinner from "@/Components/Icons/Spinner";
import ProfilePage from "@/Pages/Profile/ProfilePage";
export default function NostrLinkHandler() {
const { state } = useLocation();
const { link } = useParams();
const determineInitialComponent = link => {
const nav = tryParseNostrLink(link);
if (nav) {
switch (nav.type) {
case NostrPrefix.Event:
case NostrPrefix.Note:
case NostrPrefix.Address:
return