Load zap sender profile
This commit is contained in:
parent
c301d4b9c4
commit
54282e13de
@ -9,6 +9,7 @@ import { Profile } from "./profile";
|
||||
import { Icon } from "./icon";
|
||||
import Spinner from "./spinner";
|
||||
import { useLogin } from "hooks/login";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
|
||||
export interface LiveChatOptions {
|
||||
canWrite?: boolean,
|
||||
@ -103,6 +104,8 @@ function ChatMessage({ ev, link }: { ev: TaggedRawEvent, link: NostrLink }) {
|
||||
|
||||
function ChatZap({ ev }: { ev: TaggedRawEvent }) {
|
||||
const parsed = parseZap(ev, System.ProfileLoader.Cache);
|
||||
useUserProfile(System, parsed.sender);
|
||||
|
||||
if(!parsed.valid) {
|
||||
console.debug(parsed);
|
||||
return null;
|
||||
|
@ -1,7 +1,8 @@
|
||||
import './index.css';
|
||||
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import { NostrSystem } from "@snort/system";
|
||||
import './index.css';
|
||||
import { RootPage } from './pages/root';
|
||||
import { RouterProvider, createBrowserRouter } from 'react-router-dom';
|
||||
import { LayoutPage } from 'pages/layout';
|
||||
@ -16,7 +17,9 @@ export const Login = new LoginStore();
|
||||
|
||||
[
|
||||
"wss://relay.snort.social",
|
||||
"wss://nos.lol"
|
||||
"wss://nos.lol",
|
||||
"wss://relay.damus.io",
|
||||
"wss://nostr.wine"
|
||||
].forEach(r => System.ConnectToRelay(r, { read: true, write: true }));
|
||||
|
||||
const router = createBrowserRouter([
|
||||
|
Loading…
x
Reference in New Issue
Block a user