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