chore: cleanup

This commit is contained in:
2023-11-01 00:40:12 +09:00
parent 8f90daa840
commit c65bb7a992
56 changed files with 344 additions and 221 deletions

View File

@ -2,9 +2,9 @@ import { NostrPrefix, tryParseNostrLink } from "@snort/system";
import { useEffect, useState } from "react";
import { FormattedMessage } from "react-intl";
import { useLocation, useParams } from "react-router-dom";
import { fetchNip05Pubkey } from "@snort/shared";
import Spinner from "Icons/Spinner";
import { getNip05PubKey } from "Pages/LoginPage";
import ProfilePage from "Pages/Profile/ProfilePage";
import { ThreadRoute } from "Element/Event/Thread";
@ -30,7 +30,7 @@ export default function NostrLinkHandler() {
setRenderComponent(<ProfilePage state={state} />); // Directly render ProfilePage from route state
} else {
try {
const pubkey = await getNip05PubKey(`${link}@${CONFIG.nip05Domain}`);
const pubkey = await fetchNip05Pubkey(link, CONFIG.nip05Domain);
if (pubkey) {
setRenderComponent(<ProfilePage id={pubkey} state={state} />); // Directly render ProfilePage
}