refactor: RequestBuilder

This commit is contained in:
2023-03-28 15:34:01 +01:00
parent 1bf6c7031e
commit 465c59ea20
77 changed files with 3141 additions and 2343 deletions

View File

@ -1,6 +1,7 @@
import "./NoteCreator.css";
import { useState } from "react";
import { FormattedMessage } from "react-intl";
import { TaggedRawEvent } from "@snort/nostr";
import Icon from "Icons/Icon";
import useEventPublisher from "Feed/EventPublisher";
@ -8,22 +9,21 @@ import { openFile } from "Util";
import Textarea from "Element/Textarea";
import Modal from "Element/Modal";
import ProfileImage from "Element/ProfileImage";
import { Event as NEvent } from "@snort/nostr";
import useFileUpload from "Upload";
import messages from "./messages";
interface NotePreviewProps {
note: NEvent;
note: TaggedRawEvent;
}
function NotePreview({ note }: NotePreviewProps) {
return (
<div className="note-preview">
<ProfileImage pubkey={note.PubKey} />
<ProfileImage pubkey={note.pubkey} />
<div className="note-preview-body">
{note.Content.slice(0, 136)}
{note.Content.length > 140 && "..."}
{note.content.slice(0, 136)}
{note.content.length > 140 && "..."}
</div>
</div>
);
@ -32,7 +32,7 @@ function NotePreview({ note }: NotePreviewProps) {
export interface NoteCreatorProps {
show: boolean;
setShow: (s: boolean) => void;
replyTo?: NEvent;
replyTo?: TaggedRawEvent;
onSend?: () => void;
autoFocus: boolean;
}