|
|
@ -131,7 +131,6 @@ export const renderRecommendServer = (evt: Event, relay: string) => {
|
|
|
|
|
|
|
|
|
|
|
|
export const renderEventDetails = (evt: Event, relay: string) => {
|
|
|
|
export const renderEventDetails = (evt: Event, relay: string) => {
|
|
|
|
const {img, name, userName} = getMetadata(evt.pubkey);
|
|
|
|
const {img, name, userName} = getMetadata(evt.pubkey);
|
|
|
|
const time = new Date(evt.created_at * 1000);
|
|
|
|
|
|
|
|
const npub = nip19.npubEncode(evt.pubkey);
|
|
|
|
const npub = nip19.npubEncode(evt.pubkey);
|
|
|
|
|
|
|
|
|
|
|
|
let content = parseJSON(evt.content)
|
|
|
|
let content = parseJSON(evt.content)
|
|
|
@ -142,7 +141,7 @@ export const renderEventDetails = (evt: Event, relay: string) => {
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
content = `${evt.content}`;
|
|
|
|
content = `${evt.content}`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const body = elem('div', {className: 'mbox-body', title: dateTime.format(time)}, [
|
|
|
|
const body = elem('div', {className: 'mbox-body'}, [
|
|
|
|
elem('header', {className: 'mbox-header'}, [
|
|
|
|
elem('header', {className: 'mbox-header'}, [
|
|
|
|
elem('a', {
|
|
|
|
elem('a', {
|
|
|
|
className: `mbox-username${name ? ' mbox-kind0-name' : ''}`,
|
|
|
|
className: `mbox-username${name ? ' mbox-kind0-name' : ''}`,
|
|
|
|