eslint: sort imports & exports
This commit is contained in:
@ -1,33 +1,34 @@
|
||||
import "./NoteCreator.css";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { fetchNip05Pubkey, unixNow } from "@snort/shared";
|
||||
import { EventBuilder, EventKind, NostrLink, NostrPrefix, TaggedNostrEvent, tryParseNostrLink } from "@snort/system";
|
||||
import classNames from "classnames";
|
||||
import { ClipboardEventHandler, DragEvent, useEffect } from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { TagsInput } from "react-tag-input-component";
|
||||
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { appendDedupe, openFile, trackEvent } from "@/Utils";
|
||||
import Textarea from "@/Components/Textarea/Textarea";
|
||||
import Modal from "@/Components/Modal/Modal";
|
||||
import ProfileImage from "@/Components/User/ProfileImage";
|
||||
import useFileUpload from "@/Utils/Upload";
|
||||
import Note from "@/Components/Event/Note";
|
||||
|
||||
import { ClipboardEventHandler, DragEvent, useEffect } from "react";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import { AsyncIcon } from "@/Components/Button/AsyncIcon";
|
||||
import { fetchNip05Pubkey, unixNow } from "@snort/shared";
|
||||
import { ZapTarget } from "@/Utils/Zapper";
|
||||
import { useNoteCreator } from "@/State/NoteCreator";
|
||||
import FileUploadProgress from "../FileUpload";
|
||||
import { ToggleSwitch } from "@/Components/Icons/Toggle";
|
||||
import { sendEventToRelays } from "@/Components/Event/Create/util";
|
||||
import { TrendingHashTagsLine } from "@/Components/Event/Create/TrendingHashTagsLine";
|
||||
import { Toastore } from "@/Components/Toaster/Toaster";
|
||||
import { OkResponseRow } from "./OkResponseRow";
|
||||
import CloseButton from "@/Components/Button/CloseButton";
|
||||
import { TrendingHashTagsLine } from "@/Components/Event/Create/TrendingHashTagsLine";
|
||||
import { sendEventToRelays } from "@/Components/Event/Create/util";
|
||||
import Note from "@/Components/Event/Note";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import { ToggleSwitch } from "@/Components/Icons/Toggle";
|
||||
import Modal from "@/Components/Modal/Modal";
|
||||
import Textarea from "@/Components/Textarea/Textarea";
|
||||
import { Toastore } from "@/Components/Toaster/Toaster";
|
||||
import ProfileImage from "@/Components/User/ProfileImage";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { useNoteCreator } from "@/State/NoteCreator";
|
||||
import { appendDedupe, openFile, trackEvent } from "@/Utils";
|
||||
import useFileUpload from "@/Utils/Upload";
|
||||
import { GetPowWorker } from "@/Utils/wasm";
|
||||
import { ZapTarget } from "@/Utils/Zapper";
|
||||
|
||||
import FileUploadProgress from "../FileUpload";
|
||||
import { OkResponseRow } from "./OkResponseRow";
|
||||
|
||||
export function NoteCreator() {
|
||||
const { formatMessage } = useIntl();
|
||||
|
@ -1,14 +1,15 @@
|
||||
import { useRef, useMemo } from "react";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import classNames from "classnames";
|
||||
import { useMemo,useRef } from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { useLocation } from "react-router-dom";
|
||||
|
||||
import { isFormElement } from "@/Utils";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import useKeyboardShortcut from "@/Hooks/useKeyboardShortcut";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import { useNoteCreator } from "@/State/NoteCreator";
|
||||
import { isFormElement } from "@/Utils";
|
||||
|
||||
import { NoteCreator } from "./NoteCreator";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
export const NoteCreatorButton = ({
|
||||
className,
|
||||
|
@ -1,16 +1,17 @@
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import IconButton from "@/Components/Button/IconButton";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import { removeRelay } from "@/Utils/Login";
|
||||
import { saveRelays } from "@/Pages/settings/Relays";
|
||||
import { getRelayName } from "@/Utils";
|
||||
import { unwrap, sanitizeRelayUrl } from "@snort/shared";
|
||||
import { sanitizeRelayUrl,unwrap } from "@snort/shared";
|
||||
import { OkResponse } from "@snort/system";
|
||||
import { useState } from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import IconButton from "@/Components/Button/IconButton";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { saveRelays } from "@/Pages/settings/Relays";
|
||||
import { getRelayName } from "@/Utils";
|
||||
import { removeRelay } from "@/Utils/Login";
|
||||
|
||||
export function OkResponseRow({ rsp, close }: { rsp: OkResponse; close: () => void }) {
|
||||
const [r, setResult] = useState(rsp);
|
||||
const { formatMessage } = useIntl();
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { useLocale } from "@/IntlProvider";
|
||||
import NostrBandApi from "@/External/NostrBand";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import useCachedFetch from "@/Hooks/useCachedFetch";
|
||||
|
||||
import { ErrorOrOffline } from "@/Components/ErrorOrOffline";
|
||||
import NostrBandApi from "@/External/NostrBand";
|
||||
import useCachedFetch from "@/Hooks/useCachedFetch";
|
||||
import { useLocale } from "@/IntlProvider";
|
||||
|
||||
export function TrendingHashTagsLine(props: { onClick: (tag: string) => void }) {
|
||||
const { lang } = useLocale();
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { NostrEvent, OkResponse, SystemInterface } from "@snort/system";
|
||||
import { removeUndefined } from "@snort/shared";
|
||||
import { NostrEvent, OkResponse, SystemInterface } from "@snort/system";
|
||||
|
||||
export async function sendEventToRelays(
|
||||
system: SystemInterface,
|
||||
|
@ -1,7 +1,8 @@
|
||||
import messages from "../messages";
|
||||
import { useState } from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import messages from "../messages";
|
||||
|
||||
const HiddenNote = ({ children }: { children: React.ReactNode }) => {
|
||||
const [show, setShow] = useState(false);
|
||||
return show ? (
|
||||
|
@ -1,17 +1,19 @@
|
||||
import "./LongFormText.css";
|
||||
import React, { CSSProperties, useCallback, useRef, useState } from "react";
|
||||
import { FormattedMessage, FormattedNumber } from "react-intl";
|
||||
|
||||
import { NostrLink, TaggedNostrEvent } from "@snort/system";
|
||||
import { useEventReactions } from "@snort/system-react";
|
||||
import classNames from "classnames";
|
||||
import React, { CSSProperties, useCallback, useRef, useState } from "react";
|
||||
import { FormattedMessage, FormattedNumber } from "react-intl";
|
||||
|
||||
import { findTag } from "@/Utils";
|
||||
import Text from "@/Components/Text/Text";
|
||||
import { Markdown } from "./Markdown";
|
||||
import useImgProxy from "@/Hooks/useImgProxy";
|
||||
import ProfilePreview from "@/Components/User/ProfilePreview";
|
||||
import useImgProxy from "@/Hooks/useImgProxy";
|
||||
import { findTag } from "@/Utils";
|
||||
|
||||
import { Markdown } from "./Markdown";
|
||||
import NoteFooter from "./NoteFooter";
|
||||
import NoteTime from "./NoteTime";
|
||||
import classNames from "classnames";
|
||||
|
||||
interface LongFormTextProps {
|
||||
ev: TaggedNostrEvent;
|
||||
|
@ -1,13 +1,13 @@
|
||||
import "./Markdown.css";
|
||||
|
||||
import { ReactNode, forwardRef, useMemo } from "react";
|
||||
import { transformText } from "@snort/system";
|
||||
import { marked, Token } from "marked";
|
||||
import markedFootnote, { Footnote, FootnoteRef,Footnotes } from "marked-footnote";
|
||||
import { forwardRef, ReactNode, useMemo } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import markedFootnote, { Footnotes, Footnote, FootnoteRef } from "marked-footnote";
|
||||
|
||||
import { ProxyImg } from "@/Components/ProxyImg";
|
||||
import NostrLink from "@/Components/Embed/NostrLink";
|
||||
import { ProxyImg } from "@/Components/ProxyImg";
|
||||
|
||||
interface MarkdownProps {
|
||||
content: string;
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { NostrEvent, NostrLink } from "@snort/system";
|
||||
import { useEventFeed } from "@snort/system-react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import { findTag } from "@/Utils";
|
||||
import PageSpinner from "@/Components/PageSpinner";
|
||||
import Reveal from "@/Components/Event/Reveal";
|
||||
import { MediaElement } from "@/Components/Embed/MediaElement";
|
||||
import Reveal from "@/Components/Event/Reveal";
|
||||
import PageSpinner from "@/Components/PageSpinner";
|
||||
import { findTag } from "@/Utils";
|
||||
|
||||
export default function NostrFileHeader({ link }: { link: NostrLink }) {
|
||||
const ev = useEventFeed(link);
|
||||
|
@ -1,16 +1,19 @@
|
||||
import "./Note.css";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
import { EventKind, NostrEvent, TaggedNostrEvent } from "@snort/system";
|
||||
import { NostrFileElement } from "@/Components/Event/NostrFileHeader";
|
||||
import ZapstrEmbed from "@/Components/Embed/ZapstrEmbed";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
import PubkeyList from "@/Components/Embed/PubkeyList";
|
||||
import { LiveEvent } from "@/Components/LiveStream/LiveEvent";
|
||||
import { ZapGoal } from "@/Components/Event/ZapGoal";
|
||||
import NoteReaction from "@/Components/Event/NoteReaction";
|
||||
import ProfilePreview from "@/Components/User/ProfilePreview";
|
||||
import { NoteInner } from "./NoteInner";
|
||||
import { LongFormText } from "./LongFormText";
|
||||
import ZapstrEmbed from "@/Components/Embed/ZapstrEmbed";
|
||||
import ErrorBoundary from "@/Components/ErrorBoundary";
|
||||
import { NostrFileElement } from "@/Components/Event/NostrFileHeader";
|
||||
import NoteReaction from "@/Components/Event/NoteReaction";
|
||||
import { ZapGoal } from "@/Components/Event/ZapGoal";
|
||||
import { LiveEvent } from "@/Components/LiveStream/LiveEvent";
|
||||
import ProfilePreview from "@/Components/User/ProfilePreview";
|
||||
|
||||
import { LongFormText } from "./LongFormText";
|
||||
import { NoteInner } from "./NoteInner";
|
||||
|
||||
export interface NoteProps {
|
||||
data: TaggedNostrEvent;
|
||||
|
@ -1,17 +1,18 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { HexKey, NostrLink, NostrPrefix, TaggedNostrEvent } from "@snort/system";
|
||||
import { Menu, MenuItem } from "@szhsin/react-menu";
|
||||
import { useEffect, useState } from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import { setPinned, setBookmarked } from "@/Utils/Login";
|
||||
import messages from "@/Components/messages";
|
||||
import SnortApi from "@/External/SnortApi";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { setBookmarked,setPinned } from "@/Utils/Login";
|
||||
import { getCurrentSubscription,SubscriptionType } from "@/Utils/Subscription";
|
||||
|
||||
import { ReBroadcaster } from "../ReBroadcaster";
|
||||
import SnortApi from "@/External/SnortApi";
|
||||
import { SubscriptionType, getCurrentSubscription } from "@/Utils/Subscription";
|
||||
|
||||
export interface NoteTranslation {
|
||||
text: string;
|
||||
|
@ -1,26 +1,25 @@
|
||||
import React, { forwardRef, useEffect, useState } from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { useLongPress } from "use-long-press";
|
||||
import { TaggedNostrEvent, ParsedZap, countLeadingZeros, NostrLink } from "@snort/system";
|
||||
import { normalizeReaction } from "@snort/shared";
|
||||
import { countLeadingZeros, NostrLink,ParsedZap, TaggedNostrEvent } from "@snort/system";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
import { Menu, MenuItem } from "@szhsin/react-menu";
|
||||
import classNames from "classnames";
|
||||
import React, { forwardRef, useEffect, useState } from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { useLongPress } from "use-long-press";
|
||||
|
||||
import { formatShort } from "@/Utils/Number";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { delay, findTag, getDisplayName } from "@/Utils";
|
||||
import SendSats from "@/Components/SendSats/SendSats";
|
||||
import { ZapsSummary } from "@/Components/Event/Zap";
|
||||
import { AsyncIcon, AsyncIconProps } from "@/Components/Button/AsyncIcon";
|
||||
|
||||
import { useWallet } from "@/Wallet";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { useInteractionCache } from "@/Hooks/useInteractionCache";
|
||||
import { ZapPoolController } from "@/Utils/ZapPoolController";
|
||||
import { Zapper, ZapTarget } from "@/Utils/Zapper";
|
||||
import { useNoteCreator } from "@/State/NoteCreator";
|
||||
import { ZapsSummary } from "@/Components/Event/Zap";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import SendSats from "@/Components/SendSats/SendSats";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { useInteractionCache } from "@/Hooks/useInteractionCache";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { useNoteCreator } from "@/State/NoteCreator";
|
||||
import { delay, findTag, getDisplayName } from "@/Utils";
|
||||
import { formatShort } from "@/Utils/Number";
|
||||
import { Zapper, ZapTarget } from "@/Utils/Zapper";
|
||||
import { ZapPoolController } from "@/Utils/ZapPoolController";
|
||||
import { useWallet } from "@/Wallet";
|
||||
|
||||
import messages from "../messages";
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import "./Note.css";
|
||||
|
||||
import ProfileImage from "@/Components/User/ProfileImage";
|
||||
|
||||
interface NoteGhostProps {
|
||||
|
@ -1,32 +1,33 @@
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
import { EventExt, EventKind, HexKey, NostrLink, NostrPrefix, TaggedNostrEvent } from "@snort/system";
|
||||
import { useEventReactions } from "@snort/system-react";
|
||||
import classNames from "classnames";
|
||||
import React, { ReactNode, useMemo, useState } from "react";
|
||||
import { useInView } from "react-intersection-observer";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import classNames from "classnames";
|
||||
import { EventExt, EventKind, HexKey, NostrLink, NostrPrefix, TaggedNostrEvent } from "@snort/system";
|
||||
import { useEventReactions } from "@snort/system-react";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
|
||||
import { findTag, hexToBech32 } from "@/Utils";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { NoteContextMenu, NoteTranslation } from "./NoteContextMenu";
|
||||
import { UserCache } from "@/Cache";
|
||||
import messages from "../messages";
|
||||
import { setBookmarked, setPinned } from "@/Utils/Login";
|
||||
import Text from "../Text/Text";
|
||||
import Reveal from "./Reveal";
|
||||
import Poll from "./Poll";
|
||||
import ProfileImage from "../User/ProfileImage";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import NoteTime from "./NoteTime";
|
||||
import NoteFooter from "./NoteFooter";
|
||||
import Reactions from "./Reactions";
|
||||
import DisplayName from "@/Components/User/DisplayName";
|
||||
import { ProfileLink } from "@/Components/User/ProfileLink";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
import { chainKey } from "@/Hooks/useThreadContext";
|
||||
import { findTag, hexToBech32 } from "@/Utils";
|
||||
import { setBookmarked, setPinned } from "@/Utils/Login";
|
||||
|
||||
import messages from "../messages";
|
||||
import Text from "../Text/Text";
|
||||
import ProfileImage from "../User/ProfileImage";
|
||||
import HiddenNote from "./HiddenNote";
|
||||
import { NoteProps } from "./Note";
|
||||
import { chainKey } from "@/Hooks/useThreadContext";
|
||||
import { ProfileLink } from "@/Components/User/ProfileLink";
|
||||
import DisplayName from "@/Components/User/DisplayName";
|
||||
import { NoteContextMenu, NoteTranslation } from "./NoteContextMenu";
|
||||
import NoteFooter from "./NoteFooter";
|
||||
import NoteTime from "./NoteTime";
|
||||
import Poll from "./Poll";
|
||||
import Reactions from "./Reactions";
|
||||
import Reveal from "./Reveal";
|
||||
|
||||
const TEXT_TRUNCATE_LENGTH = 400;
|
||||
|
||||
|
@ -1,15 +1,16 @@
|
||||
import "./NoteReaction.css";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
import { EventExt,EventKind, NostrEvent, NostrPrefix, TaggedNostrEvent } from "@snort/system";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
import { useMemo } from "react";
|
||||
import { EventKind, NostrEvent, TaggedNostrEvent, NostrPrefix, EventExt } from "@snort/system";
|
||||
import { useInView } from "react-intersection-observer";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
import Note from "@/Components/Event/Note";
|
||||
import { eventLink, hexToBech32, getDisplayName } from "@/Utils";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
import { useInView } from "react-intersection-observer";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
import { eventLink, getDisplayName,hexToBech32 } from "@/Utils";
|
||||
|
||||
export interface NoteReactionProps {
|
||||
data: TaggedNostrEvent;
|
||||
|
@ -1,16 +1,16 @@
|
||||
import { TaggedNostrEvent, ParsedZap, NostrLink } from "@snort/system";
|
||||
import { LNURL } from "@snort/shared";
|
||||
import { NostrLink,ParsedZap, TaggedNostrEvent } from "@snort/system";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
import { useState } from "react";
|
||||
import { FormattedMessage, FormattedNumber, useIntl } from "react-intl";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { useWallet } from "@/Wallet";
|
||||
import { unwrap } from "@/Utils";
|
||||
import { formatShort } from "@/Utils/Number";
|
||||
import Spinner from "@/Components/Icons/Spinner";
|
||||
import SendSats from "@/Components/SendSats/SendSats";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { unwrap } from "@/Utils";
|
||||
import { formatShort } from "@/Utils/Number";
|
||||
import { useWallet } from "@/Wallet";
|
||||
|
||||
interface PollProps {
|
||||
ev: TaggedNostrEvent;
|
||||
|
@ -1,18 +1,18 @@
|
||||
import "./Reactions.css";
|
||||
|
||||
import { useState, useMemo, useEffect } from "react";
|
||||
import { useIntl, FormattedMessage } from "react-intl";
|
||||
import { TaggedNostrEvent, ParsedZap } from "@snort/system";
|
||||
import { ParsedZap,TaggedNostrEvent } from "@snort/system";
|
||||
import { useEffect,useMemo, useState } from "react";
|
||||
import { FormattedMessage,useIntl } from "react-intl";
|
||||
|
||||
import { formatShort } from "@/Utils/Number";
|
||||
import CloseButton from "@/Components/Button/CloseButton";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import { Tab } from "@/Components/Tabs/Tabs";
|
||||
import ProfileImage from "@/Components/User/ProfileImage";
|
||||
import Tabs from "@/Components/Tabs/Tabs";
|
||||
import Modal from "@/Components/Modal/Modal";
|
||||
import { Tab } from "@/Components/Tabs/Tabs";
|
||||
import Tabs from "@/Components/Tabs/Tabs";
|
||||
import ProfileImage from "@/Components/User/ProfileImage";
|
||||
import { formatShort } from "@/Utils/Number";
|
||||
|
||||
import messages from "../messages";
|
||||
import CloseButton from "@/Components/Button/CloseButton";
|
||||
|
||||
interface ReactionsProps {
|
||||
show: boolean;
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { WarningNotice } from "@/Components/WarningNotice/WarningNotice";
|
||||
import { useState } from "react";
|
||||
|
||||
import { WarningNotice } from "@/Components/WarningNotice/WarningNotice";
|
||||
|
||||
interface RevealProps {
|
||||
message: React.ReactNode;
|
||||
children: React.ReactNode;
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { IMeta } from "@snort/system";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
import { FileExtensionRegex } from "@/Utils/Const";
|
||||
import { MediaElement } from "@/Components/Embed/MediaElement";
|
||||
import Reveal from "@/Components/Event/Reveal";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { MediaElement } from "@/Components/Embed/MediaElement";
|
||||
import { Link } from "react-router-dom";
|
||||
import { IMeta } from "@snort/system";
|
||||
import { FileExtensionRegex } from "@/Utils/Const";
|
||||
|
||||
interface RevealMediaProps {
|
||||
creator: string;
|
||||
|
@ -1,8 +1,9 @@
|
||||
import "./ShowMore.css";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { useInView } from "react-intersection-observer";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import classNames from "classnames";
|
||||
import { useEffect } from "react";
|
||||
import { useInView } from "react-intersection-observer";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
interface ShowMoreProps {
|
||||
text?: string;
|
||||
|
@ -1,16 +1,17 @@
|
||||
import "./Thread.css";
|
||||
import { useMemo, useState, ReactNode, useContext, Fragment } from "react";
|
||||
|
||||
import { EventExt, NostrLink,NostrPrefix, parseNostrLink, TaggedNostrEvent, u256 } from "@snort/system";
|
||||
import classNames from "classnames";
|
||||
import { Fragment,ReactNode, useContext, useMemo, useState } from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import { TaggedNostrEvent, u256, NostrPrefix, EventExt, parseNostrLink, NostrLink } from "@snort/system";
|
||||
import classNames from "classnames";
|
||||
|
||||
import { getAllLinkReactions, getLinkReactions } from "@/Utils";
|
||||
import BackButton from "@/Components/Button/BackButton";
|
||||
import Collapsed from "@/Components/Collapsed";
|
||||
import Note from "@/Components/Event/Note";
|
||||
import NoteGhost from "@/Components/Event/NoteGhost";
|
||||
import Collapsed from "@/Components/Collapsed";
|
||||
import { ThreadContext, ThreadContextWrapper, chainKey } from "@/Hooks/useThreadContext";
|
||||
import { chainKey,ThreadContext, ThreadContextWrapper } from "@/Hooks/useThreadContext";
|
||||
import { getAllLinkReactions, getLinkReactions } from "@/Utils";
|
||||
|
||||
import messages from "../messages";
|
||||
|
||||
|
@ -1,13 +1,14 @@
|
||||
import "./Zap.css";
|
||||
import { useMemo } from "react";
|
||||
|
||||
import { ParsedZap } from "@snort/system";
|
||||
import { useMemo } from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { unwrap } from "@/Utils";
|
||||
import { formatShort } from "@/Utils/Number";
|
||||
import Text from "@/Components/Text/Text";
|
||||
import ProfileImage from "@/Components/User/ProfileImage";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { unwrap } from "@/Utils";
|
||||
import { formatShort } from "@/Utils/Number";
|
||||
|
||||
import messages from "../messages";
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
import "./ZapButton.css";
|
||||
import { useState } from "react";
|
||||
|
||||
import { HexKey } from "@snort/system";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
import { useState } from "react";
|
||||
|
||||
import SendSats from "@/Components/SendSats/SendSats";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import SendSats from "@/Components/SendSats/SendSats";
|
||||
import { ZapTarget } from "@/Utils/Zapper";
|
||||
|
||||
const ZapButton = ({
|
||||
|
@ -1,15 +1,18 @@
|
||||
import "./ZapGoal.css";
|
||||
import { useState } from "react";
|
||||
|
||||
import { NostrEvent, NostrLink } from "@snort/system";
|
||||
import useZapsFeed from "@/Feed/ZapsFeed";
|
||||
import { formatShort } from "@/Utils/Number";
|
||||
import { findTag } from "@/Utils";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import SendSats from "../SendSats/SendSats";
|
||||
import { Zapper } from "@/Utils/Zapper";
|
||||
import Progress from "@/Components/Progress/Progress";
|
||||
import { useState } from "react";
|
||||
import { FormattedNumber } from "react-intl";
|
||||
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import Progress from "@/Components/Progress/Progress";
|
||||
import useZapsFeed from "@/Feed/ZapsFeed";
|
||||
import { findTag } from "@/Utils";
|
||||
import { formatShort } from "@/Utils/Number";
|
||||
import { Zapper } from "@/Utils/Zapper";
|
||||
|
||||
import SendSats from "../SendSats/SendSats";
|
||||
|
||||
export function ZapGoal({ ev }: { ev: NostrEvent }) {
|
||||
const [zap, setZap] = useState(false);
|
||||
const zaps = useZapsFeed(NostrLink.fromEvent(ev));
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { transformTextCached } from "@/Hooks/useTextTransformCache";
|
||||
import { TaggedNostrEvent } from "@snort/system";
|
||||
|
||||
import { transformTextCached } from "@/Hooks/useTextTransformCache";
|
||||
|
||||
export default function getEventMedia(event: TaggedNostrEvent) {
|
||||
const parsed = transformTextCached(event.id, event.content, event.tags);
|
||||
return parsed.filter(
|
||||
|
Reference in New Issue
Block a user