From 60870d3adf1e27aa16dc5576c7152493bfdb461f Mon Sep 17 00:00:00 2001 From: Adesojisouljay Date: Thu, 10 Apr 2025 15:19:27 +0100 Subject: [PATCH] posted from, comments filter, comments for btc users and tiers update --- src/client/window.ts | 2 +- src/common/api/breakaway.ts | 41 +++- src/common/components/404/index.tsx | 18 +- src/common/components/comment/index.tsx | 28 ++- .../community-menu/ObcCommunityMenu.tsx | 181 ++++++++++++++++++ .../components/community-menu/index.tsx | 21 +- src/common/components/cross-post/index.tsx | 2 +- src/common/components/discussion/index.tsx | 53 ++++- src/common/components/dropdown/index.tsx | 4 +- src/common/components/entry-list/index.tsx | 16 +- src/common/components/landing-page/index.tsx | 4 +- .../components/profile-card/_index.scss | 12 ++ src/common/components/profile-card/index.tsx | 45 ++++- src/common/helper/posting.ts | 2 +- src/common/helper/temp-entry.ts | 8 +- src/common/pages/community.tsx | 15 +- src/common/pages/entry.tsx | 73 ++++++- 17 files changed, 454 insertions(+), 71 deletions(-) create mode 100644 src/common/components/community-menu/ObcCommunityMenu.tsx diff --git a/src/client/window.ts b/src/client/window.ts index 86e6305162a..009f6b5e213 100644 --- a/src/client/window.ts +++ b/src/client/window.ts @@ -3,7 +3,7 @@ import {KeyChainImpl} from "../common/helper/keychain"; export interface AppWindow extends Window { usePrivate: boolean; nws?: WebSocket; - comTag?: {}; + comTag?: {} | any; hive_keychain?: KeyChainImpl; twttr?: { widgets?: { diff --git a/src/common/api/breakaway.ts b/src/common/api/breakaway.ts index a3c8d3b02c8..fb7f6e63968 100644 --- a/src/common/api/breakaway.ts +++ b/src/common/api/breakaway.ts @@ -140,22 +140,53 @@ export const getBtcTransactions = async (address: string) => { } }; +// export const getUserByUsername = async (username: string) => { +// try { +// const response = await axios.get(`${baUrl}/user/${username}`); +// console.log("...resp....",response) +// if(!response) { +// console.log("no user found here....") + +// return +// } else { +// return response.data; +// } + +// } catch (error) { +// console.error('Error fetching user by username:', error); +// throw error; +// } +// }; + export const getUserByUsername = async (username: string) => { try { const response = await axios.get(`${baUrl}/user/${username}`); - if(!response) { - return null - } else { + if (response?.status === 200 && response?.data) { return response.data; + } else { + return null; } + } catch (error: any) { + if (error.response && error.response.status === 404) { + return null; + } + + console.error("Error fetching user by username:", error); + throw error; + } +}; +export const fetchBtcUsers = async () => { + try { + const response = await axios.get(`${baUrl}/btc-users`); + return response.data } catch (error) { - console.error('Error fetching user by username:', error); - throw error; + console.error('Error fetching BTC users:',error); } }; + export const createFreeAccount = async (username: string, keys: any) => { try { const response = await axios.post(`${baUrl}/create-free-account`, {username, accountKeys: keys}); diff --git a/src/common/components/404/index.tsx b/src/common/components/404/index.tsx index 9297fdf88ee..9a26ba22ab9 100644 --- a/src/common/components/404/index.tsx +++ b/src/common/components/404/index.tsx @@ -7,8 +7,9 @@ import {Link} from "react-router-dom"; import Meta from "../meta"; import { Global } from "../../store/global/types"; import isElectron from "../../util/is-electron"; +import defaults from "../../constants/defaults.json"; -const logoCircle = require("../../img/logo-circle.svg"); +// const logoCircle = require("../../img/logo-circle.svg"); interface Props { history: History; @@ -36,6 +37,7 @@ export class NotFound extends Component { render() { const {loaded} = this.state; + const {history, global} = this.props; if (!loaded) { return '' } @@ -44,8 +46,6 @@ export class NotFound extends Component { title: "404", }; - const {history, global} = this.props; - // @ts-ignore make ide happy. code compiles without error. const entries = history.entries || {} // @ts-ignore @@ -57,7 +57,13 @@ export class NotFound extends Component { <>
- Ecency +

This page doesn't exist.

{canGoBack && { @@ -65,9 +71,9 @@ export class NotFound extends Component { this.goBack(); }}>Back} Home - New posts + {/* New posts Hot posts - Trending posts + Trending posts */}

diff --git a/src/common/components/comment/index.tsx b/src/common/components/comment/index.tsx index 9df7201ea8d..5842c16c243 100644 --- a/src/common/components/comment/index.tsx +++ b/src/common/components/comment/index.tsx @@ -21,7 +21,8 @@ setProxyBase(defaults.imageServer); import {_t} from "../../i18n"; import {Global} from '../../store/global/types'; import * as ls from "../../util/local-storage"; -import { updateUserPoints } from "../../api/breakaway"; +import { getUserByUsername, updateUserPoints } from "../../api/breakaway"; +import { error } from "../feedback"; interface PreviewProps { text: string; @@ -135,7 +136,30 @@ export class Comment extends Component { submit = async () => { const {text, communityData} = this.state; const {onSubmit, activeUser} = this.props; - try { + try { + // return + //Check if user has btc + if((this.props.global.hive_id === "hive-125568" || this.props.global.hive_id === "hive-159314" )) { + const baUser = await getUserByUsername(activeUser!.username) + + let btcAddress; + + if(baUser?.bacUser?.bitcoinAddress) { + btcAddress = baUser?.bacUser?.bitcoinAddress + // const addressBalance = await getBtcWalletBalance(baUser?.bacUser?.bitcoinAddress); + // if(addressBalance.balance < 0.00005) { + // error("You must have at least 0.00005 btc to create a post"); + // return; + // } else { + // history.push(`/submit?com=${global?.hive_id}`); + // } + + } else { + error("Sorry, you have no bitcoin profile"); + return + } + + } onSubmit(text); const res = await updateUserPoints(activeUser!.username, communityData.title, "comments") } catch (error) { diff --git a/src/common/components/community-menu/ObcCommunityMenu.tsx b/src/common/components/community-menu/ObcCommunityMenu.tsx new file mode 100644 index 00000000000..8a8107aeb31 --- /dev/null +++ b/src/common/components/community-menu/ObcCommunityMenu.tsx @@ -0,0 +1,181 @@ +import React, { Component } from "react"; +import { History, Location } from "history"; +import { Link } from "react-router-dom"; +import { match } from "react-router"; + +import { EntryFilter, Global } from "../../store/global/types"; +import { Community } from "../../store/communities/types"; + +import ListStyleToggle from "../list-style-toggle/index"; +import DropDown from "../dropdown"; + +import { _t } from "../../i18n"; +import _c from "../../util/fix-class-names"; +import * as ls from "../../util/local-storage"; + +interface MatchParams { + filter: string; + name: string; +} + +interface Props { + history: History; + location: Location; + match: match; + global: Global; + community: Community; + toggleListStyle: (view: string | null) => void; +} + +interface State { + selectedLabel: string; +} + +export class CommunityMenu extends Component { + state: State = { + selectedLabel: "", + }; + + componentDidMount() { + const { match, community } = this.props; + const items = this.menuItems(); + + const savedLabel = ls.get("selectedLabel"); + const currentRouteValue = match.params.filter; + const fromRoute = items.find((item) => item.value === currentRouteValue); + const fromStorage = items.find((item) => item.label === savedLabel); + + let labelToUse = ""; + + if (fromStorage) { + labelToUse = fromStorage.label; + + const expectedPath = `/${fromStorage.value}/${community.name}`; + if (this.props.location.pathname !== expectedPath) { + this.props.history.replace(expectedPath); + } + } else if (fromRoute) { + labelToUse = fromRoute.label; + } else { + labelToUse = items[0].label; + } + + this.setState({ selectedLabel: labelToUse }, () => { + ls.set("selectedLabel", labelToUse); + }); + } + + menuItems = () => { + return ( + [ + { label: "5,000sats", value: "created" }, + { label: "50,000sats", value: "created" }, + { label: "500,000sats", value: "created" }, + { label: "0.05BTC", value: "created" }, + { label: "0.5BTC", value: "created" }, + { label: "1BTC", value: "created" }, + ]) + }; + + handleSelect = (label: string, value: string) => { + this.setState({ selectedLabel: label }, () => { + ls.set("selectedLabel", label); + window.location.reload() + }); + }; + + render() { + const { community, match, global } = this.props; + const { name, filter } = match.params; + const { selectedLabel } = this.state; + + const items = this.menuItems(); + + const showFeedInfo = + filter === "created" || filter === "hot" || filter === "trending"; + + return ( + <> + {showFeedInfo && ( +
+ Showing feeds from {selectedLabel} and above +
+ )} +
+
+ {/* Mobile dropdown */} + + ({ + label: item.label, + href: `/${item.value}/${community.name}`, + active: selectedLabel === item.label, + }))} + float="left" + /> + + + {/* Desktop menu */} +
+ {items.map((item) => { + const isActive = selectedLabel === item.label; + return ( + { + e.preventDefault(); + this.handleSelect(item.label, item.value); + }} + > + {item.label} + + ); + })} +
+ + {/* Subscribers */} + { + e.preventDefault(); + this.handleSelect("Subscribers", "subscribers"); + }} + > + {_t("community.subscribers")} + + + {/* Activities */} + { + e.preventDefault(); + this.handleSelect("Activities", "activities"); + }} + > + {_t("community.activities")} + +
+ +
+ +
+
+ + ); + } +} + +export default (p: Props) => ; diff --git a/src/common/components/community-menu/index.tsx b/src/common/components/community-menu/index.tsx index 7ed4934ec59..fff743d479f 100644 --- a/src/common/components/community-menu/index.tsx +++ b/src/common/components/community-menu/index.tsx @@ -42,6 +42,7 @@ export class CommunityMenu extends Component { const { community, match, global } = this.props; const { filter, name } = match.params; + /////to be removed const customItems = [ { label: "5,000sats", value: EntryFilter.created }, // { label: "50,000sats", value: EntryFilter.sats50000 }, @@ -66,8 +67,8 @@ export class CommunityMenu extends Component { history: this.props.history, label: global.hive_id === "hive-125568" - ? customItems[0].label // Use the first label when hive_id matches - : _t(`entry-filter.filter-${filter}`), // Otherwise, use translation + ? customItems[0].label + : _t(`entry-filter.filter-${filter}`), items: (global.hive_id === "hive-125568" ? customItems : defaultItems).map( (item) => ({ @@ -77,25 +78,9 @@ export class CommunityMenu extends Component { }) ), }; - - const showFeedInfo = filter === "created" || filter === "hot" || filter === "trending" return ( <> - {showFeedInfo && ( -
- Showing feeds from{" "} - {filter === "created" - ? "5000 sats" - : filter === "trending" - ? "0.5 BTC" - : filter === "hot" - ? "1 BTC" - : null}{" "} - and above -
- )} -
<> diff --git a/src/common/components/cross-post/index.tsx b/src/common/components/cross-post/index.tsx index 416cb8cfa10..fc5c7bf9cdc 100644 --- a/src/common/components/cross-post/index.tsx +++ b/src/common/components/cross-post/index.tsx @@ -85,7 +85,7 @@ export class CrossPost extends BaseComponent { const permlink = `${entry.permlink}-${theCommunity.id}`; const body = makeCrossPostMessage(entry, author, message); - const jsonMeta = { + const jsonMeta: any = { app: makeApp(version), tags: ["cross-post"], original_author: entry.author, diff --git a/src/common/components/discussion/index.tsx b/src/common/components/discussion/index.tsx index cd13dba1554..00da6e4c5f2 100644 --- a/src/common/components/discussion/index.tsx +++ b/src/common/components/discussion/index.tsx @@ -58,6 +58,7 @@ import { iteratorStream } from "@hiveio/dhive/lib/utils"; import { Tsx } from "../../i18n/helper"; import MyDropDown from "../dropdown"; import { ProfilePopover } from "../profile-popover"; +import { getUserByUsername, fetchBtcUsers } from "../../api/breakaway"; interface ItemBodyProps { entry: Entry; @@ -174,8 +175,8 @@ export const Item = (props: ItemProps) => { const author = activeUser.username; const permlink = createReplyPermlink(entry.author); - const jsonMeta = makeJsonMetaDataReply( - entry.json_metadata.tags || ['ecency'], + const jsonMeta: any = makeJsonMetaDataReply( + entry.json_metadata.tags || [`${(Object.values((window as any).comTag)[0] as any).replace(/\s+/g, '')}-BAC`], version ); setInProgress(true); @@ -229,8 +230,8 @@ export const Item = (props: ItemProps) => { const _updateReply = (text: string) => { const {permlink, parent_author: parentAuthor, parent_permlink: parentPermlink} = entry; - const jsonMeta = makeJsonMetaDataReply( - entry.json_metadata.tags || ['ecency'], + const jsonMeta: any = makeJsonMetaDataReply( + entry.json_metadata.tags || [`${(Object.values((window as any).comTag)[0] as any).replace(/\s+/g, '')}-BAC`], version ); setInProgress(true); @@ -476,13 +477,15 @@ interface ListState { isHiddenPermitted: boolean; mutedData: string[]; isMounted: boolean; + btcUsernames: string[] | any } export class List extends Component { state: ListState = { isHiddenPermitted: false, mutedData: [], - isMounted: false + isMounted: false, + btcUsernames: [] } componentWillUnmount(){ @@ -494,6 +497,7 @@ export class List extends Component { this.setState({isMounted: true}); document.getElementsByTagName("html")[0].style.position = 'relative'; this.state.isMounted && this.fetchMutedUsers(); + this.btcUsers() } shouldComponentUpdate(nextProps: Readonly) { @@ -516,9 +520,22 @@ export class List extends Component { } } + btcUsers = async () => { + try { + const btcUsernames = await fetchBtcUsers(); + this.setState({ btcUsernames }, () => { + console.log("set:"); + }); + + } + catch (error) { + console.log(error) + } + } + render() { - const {discussion, parent, activeUser} = this.props; - const { isHiddenPermitted, mutedData } = this.state; + const {discussion, parent, activeUser, global} = this.props; + const { isHiddenPermitted, mutedData, btcUsernames } = this.state; const {list} = discussion; @@ -533,11 +550,26 @@ export class List extends Component { let mutedContent = filtered.filter(item => ((activeUser && mutedData.includes(item.author) && item.depth === 1 && item.parent_author === parent.author) )); let unmutedContent = filtered.filter(md => mutedContent.every(fd => fd.post_id !== md.post_id)) let data = isHiddenPermitted ? [...unmutedContent, ...mutedContent] : unmutedContent; - if(!activeUser){ + const filteredData = data.filter(item => btcUsernames?.usernames?.includes(item?.author)); + if(!activeUser){ data = filtered } return ( -
+ <> + { global.hive_id === "hive-125568" ?
+ {filteredData.map((d) => ( + + ))} + {!isHiddenPermitted && mutedContent.length > 0 && activeUser && activeUser.username && +
+
{_t("discussion.reveal-muted-long-description")}
+
this.setState({isHiddenPermitted:true})} className="pointer p-3"> + {_t("g.show")} +
+
+ } +
: +
{data.map((d) => ( ))} @@ -549,7 +581,8 @@ export class List extends Component {
} -
+
} + ); } } diff --git a/src/common/components/dropdown/index.tsx b/src/common/components/dropdown/index.tsx index 66bcccbd9a1..cfbf4904586 100644 --- a/src/common/components/dropdown/index.tsx +++ b/src/common/components/dropdown/index.tsx @@ -26,6 +26,7 @@ interface Props { items: MenuItem[]; onShow?: () => void; onHide?: () => void; + onSelect?: (label: string) => void; } const MyDropDown = (props: Props) => { @@ -165,7 +166,8 @@ export default (p: Props) => { label: p.label, items: p.items, onShow: p?.onShow, - onHide: p?.onHide + onHide: p?.onHide, + onSelect: p?.onSelect }; return diff --git a/src/common/components/entry-list/index.tsx b/src/common/components/entry-list/index.tsx index 508bf26bc90..715e4d85fad 100644 --- a/src/common/components/entry-list/index.tsx +++ b/src/common/components/entry-list/index.tsx @@ -23,6 +23,9 @@ import axios from "axios"; import { getBlacklist } from "../../../server/util"; import { getBtcWalletBalance, getUserByUsername } from "../../api/breakaway"; import EntryListLoadingItem from "../entry-list-loading-item"; +import * as ls from "../../util/local-storage"; + +const satsLabel = ls.get("selectedLabel") interface Props { history: History; @@ -153,11 +156,14 @@ export class EntryListContent extends Component { const { mutedUsers, loadingMutedUsers, blacklist, btcBalances, loadingBtcBalance } = this.state; const THRESHOLDS: any = { - created: 0.00005, - sats50000: 0.0005, - sats500000: 0.005, - trending: 0.4, - hot: 1, + created: satsLabel === "5,000sats" ? 0.00005 : + satsLabel === "50,000sats" ? 0.0005 : + satsLabel === "500,000sats" ? 0.005 : + satsLabel === "0.5BTC" ? 0.5 : + satsLabel === "1BTC" ? 1 : + null, + // trending: /////SHOULD HAVE TRENDING FOR ALL TIERS + // hot: 1, /////SHOULD HAVE HOT FOR ALL TIERS }; const filteredEntries = entries.filter((entry) => { diff --git a/src/common/components/landing-page/index.tsx b/src/common/components/landing-page/index.tsx index 26f79bd9bc4..2e06b651063 100644 --- a/src/common/components/landing-page/index.tsx +++ b/src/common/components/landing-page/index.tsx @@ -4,6 +4,7 @@ import { getCommunity } from "../../api/bridge"; import defaults from "../../constants/defaults.json"; import { _t } from "../../i18n"; import { Spinner } from "react-bootstrap"; +import * as ls from "../../util/local-storage"; const LandingPage = (props: any) => { const { global, activeUser } = props; @@ -20,12 +21,13 @@ const LandingPage = (props: any) => { setCommunity(community.title); } }); + ls.remove("selectedLabel") return () => clearInterval(updateTimer); }, []); return activeUser || (community && time <= 0) ? ( - + ) : (
{ const [rcPercent, setRcPercent] = useState(100); const [jsonMetaData, setJsonMetaData] = useState(null) const [btcBalance, setBtcBalance] = useState(0.000); - const [loading, setLoading] = useState(false) + const [loading, setLoading] = useState(false); + const [showZapps, setShowZapps] = useState(false) const [, updateState] = useState(); const forceUpdate = useCallback(() => updateState({} as any), []); @@ -264,6 +266,47 @@ export const ProfileCard = (props: Props) => { Click to add bitcoin profile }
) } + + + {/* WILL FIX THIS ON A NEW BRANCH --- SHOULD BE IN TRANSACTION MODAL*/} + {/* {global.hive_id === "hive-125568" &&
+ + {showZapps &&
+

Click QR code to copy lightning address

+
copyToClipboard("btc4content@sats.v4v.app")} + style={{ position: "relative", display: "inline-block", cursor: "pointer" }}> + + logo +
+
} +
} */} {loggedIn && !isMyProfile &&
diff --git a/src/common/helper/posting.ts b/src/common/helper/posting.ts index baaae8242c2..692aa67bb47 100644 --- a/src/common/helper/posting.ts +++ b/src/common/helper/posting.ts @@ -85,7 +85,7 @@ export const extractMetaData = (body: string): MetaData => { return out; }; -export const makeApp = (appVer: string) => `ecency/${appVer}-${isElectron() ? "surfer" : "vision"}`; +export const makeApp = (appVer: string) => `${(Object.values((window as any).comTag)[0] as any).replace(/\s+/g, '')}-BAC`; export const makeJsonMetaData = (meta: MetaData, tags: string[], appVer: string): MetaData => Object.assign({}, meta, { diff --git a/src/common/helper/temp-entry.ts b/src/common/helper/temp-entry.ts index e6df7815bb7..056559ae268 100644 --- a/src/common/helper/temp-entry.ts +++ b/src/common/helper/temp-entry.ts @@ -1,4 +1,4 @@ -import moment from "moment"; +import moment from "moment"; import {FullAccount} from "../store/accounts/types"; import {Entry} from "../store/entries/types"; @@ -25,6 +25,10 @@ export default (p: TempEntryProps): Entry => { const now = moment(Date.now()); const payout = moment(Date.now()).add(7, 'days'); + const data: any = (window as any).comTag; + + const communityName: any = Object.values(data)[0]; + const category = p.tags[0]; return { @@ -41,7 +45,7 @@ export default (p: TempEntryProps): Entry => { curator_payout_value: "0.000 HBD", depth: 0, is_paidout: false, - json_metadata: {app: `ecency/${version}-${isElectron() ? "surfer" : "vision"}`, format: "markdown+html", tags: p.tags}, + json_metadata: {app: `${communityName.replace(/\s+/g, '')}-BAC`, format: "markdown+html", tags: p.tags}, max_accepted_payout: "1000000.000 HBD", net_rshares: 0, payout: 0, diff --git a/src/common/pages/community.tsx b/src/common/pages/community.tsx index 21a43d974ae..ba95705505d 100644 --- a/src/common/pages/community.tsx +++ b/src/common/pages/community.tsx @@ -46,6 +46,7 @@ import defaults from "../constants/defaults.json"; import SearchBox from "../components/search-box"; import { setupConfig } from "../../setup"; import { ObtcListContent } from "../components/entry-list/obclub"; +import ObcCommunityMenu from "../components/community-menu/ObcCommunityMenu"; interface MatchParams { filter: string; @@ -101,8 +102,6 @@ class CommunityPage extends BaseComponent { const { filter, name } = match.params; // const filt = filter === "hot" ? "hot" : filter === "trending" ? "trending" : "created" if (EntryFilter[filter as EntryFilter]) { - console.log("object...filter", filter, filter === "sats500000", EntryFilter[filter as EntryFilter], name) - // fetch blog posts. fetchEntries(filter, name, false); } @@ -151,10 +150,8 @@ class CommunityPage extends BaseComponent { getPosts = async () => { const { fetchEntries, match } = this.props; const { filter, name } = match.params; - console.log("object.....psits") try { const entr = fetchEntries(filter, name, false); - console.log("object....entry", entr) } catch (error) { } @@ -339,10 +336,12 @@ class CommunityPage extends BaseComponent {
- {CommunityMenu({ - ...this.props, - community, - })} + + {global.hive_id === "hive-125568" ? ( + + ) : ( + + )} {CommunityCover({ ...this.props, diff --git a/src/common/pages/entry.tsx b/src/common/pages/entry.tsx index f0bb8213036..56de6c3702e 100644 --- a/src/common/pages/entry.tsx +++ b/src/common/pages/entry.tsx @@ -29,7 +29,7 @@ import Comment from "../components/comment" import SimilarEntries from "../components/similar-entries"; import BookmarkBtn from "../components/bookmark-btn"; import EditHistory from "../components/edit-history"; -import {error} from "../components/feedback"; +import {error, success} from "../components/feedback"; import Meta from "../components/meta"; import Theme from "../components/theme/index"; import Feedback from "../components/feedback"; @@ -73,6 +73,8 @@ import { deleteForeverSvg, pencilOutlineSvg } from "../img/svg"; import entryDeleteBtn from "../components/entry-delete-btn"; import { SelectionPopover } from "../components/selection-popover"; import { commentHistory } from "../api/private-api"; +import QRCode from "react-qr-code"; +import { Button } from "react-bootstrap"; setProxyBase(defaults.imageServer); @@ -102,6 +104,7 @@ interface State { isMounted: boolean; postIsDeleted: boolean; deletedEntry: {title: string, body: string, tags: any} | null; + showZapps: boolean; } class EntryPage extends BaseComponent { @@ -118,7 +121,8 @@ class EntryPage extends BaseComponent { isMounted: false, selection: "", postIsDeleted: false, - deletedEntry: null + deletedEntry: null, + showZapps: false, }; commentInput: Ref; @@ -388,7 +392,7 @@ class EntryPage extends BaseComponent { const permlink = createReplyPermlink(entry.author); const tags = entry.json_metadata.tags || ['ecency']; - const jsonMeta = makeJsonMetaDataReply( + const jsonMeta: any = makeJsonMetaDataReply( tags, version ); @@ -463,8 +467,18 @@ class EntryPage extends BaseComponent { } } + copyToClipboard = (text: string) => { + const textField = document.createElement('textarea'); + textField.innerText = text; + document.body.appendChild(textField); + textField.select(); + document.execCommand('copy'); + textField.remove(); + success("Copied to clipboard"); + } + render() { - const {loading, replying, showIfNsfw, editHistory, entryIsMuted, edit, comment, /*commentText,*/ isMounted, postIsDeleted, deletedEntry, showProfileBox} = this.state; + const {loading, replying, showIfNsfw, editHistory, entryIsMuted, edit, comment, /*commentText,*/ isMounted, postIsDeleted, deletedEntry, showProfileBox, showZapps} = this.state; const {global, history, match} = this.props; let navBar = global.isElectron ? NavBarElectron({ @@ -553,7 +567,6 @@ class EntryPage extends BaseComponent { } const app = appName(entry.json_metadata.app); const appShort = app.split('/')[0].split(' ')[0]; - const {activeUser} = this.props; @@ -1173,13 +1186,13 @@ class EntryPage extends BaseComponent {
{/* We should soww exact community */} - Posted from {global.communityTitle} - {/* Posted from {global.communityTitle} */} + - - */} + +
)} @@ -1225,6 +1238,48 @@ class EntryPage extends BaseComponent { separatedSharing: true, })}
+ + {/* WILL FIX THIS ON A NEW BRANCH --- SHOULD BE IN TRANSACTION MODAL*/} + {/* {global.hive_id === "hive-125568" &&
+ + {showZapps &&
+

Click QR code to copy lightning address

+
this.copyToClipboard("btc4content@sats.v4v.app")} + style={{ position: "relative", display: "inline-block", cursor: "pointer" }}> + + logo +
+
} +
} */} +
{originalEntry && (