+ {
+ isUpdating
+ ?
+ : (
+
+
+ {title}
+
-
-
-
-
+ {this.renderDtubeEmbedPlayer(post)}
+
+
+ )
+ }
+
+
+
+
+
-
- {
- isAuth &&
- (
-
- )
- }
+
+
+
+
+
+ {
+ isAuth &&
+ (
+
+ )
+ }
+
+
+ )
+ }
+
+
+
+
+
+
)
}
}
-/**
- * Map redux dispatch functions to component props.
- *
- * @param {object} dispatch - Redux dispatch
- * @returns {object} - Object with recent activity data
- */
-const mapDispatchToProps = dispatch => (
- {
- showEditPost: (post) => (
- dispatch(editPost(post))
- ),
- clearPostDetails: () => (
- dispatch(clearPost())
- ),
- sendDeletePost: (author, permlink) => (
- dispatch(deletePost(author, permlink))
- ),
- clearComments: () => (
- dispatch(commentsClear())
- ),
- clearNewComments: () => (
- dispatch(sendCommentClear())
- ),
- handleResteem: (pid, author, permlink) => (
- dispatch(resteem(pid, author, permlink))
- ),
- }
-);
-
-export default connect(null, mapDispatchToProps)(PostDetails);
+export default PostDetails;
diff --git a/client/src/components/pages/Steem/Post.css b/client/src/components/pages/Steem/Posts.css
similarity index 100%
rename from client/src/components/pages/Steem/Post.css
rename to client/src/components/pages/Steem/Posts.css
diff --git a/client/src/components/pages/Steem/Posts.js b/client/src/components/pages/Steem/Posts.js
index b7d77dd..629a3c8 100644
--- a/client/src/components/pages/Steem/Posts.js
+++ b/client/src/components/pages/Steem/Posts.js
@@ -22,7 +22,7 @@ import ModalVotesList from '../../Modal/ModalVotesList';
import FollowButton from './FollowButton';
import Follows from './Follows';
-import './Post.css';
+import './Posts.css';
/**
* Gets the Steem blockchain content and displays a list of post
diff --git a/client/src/components/pages/Steem/helpers/extractContent.js b/client/src/components/pages/Steem/helpers/extractContent.js
index 454bdf0..b15dfbc 100644
--- a/client/src/components/pages/Steem/helpers/extractContent.js
+++ b/client/src/components/pages/Steem/helpers/extractContent.js
@@ -63,6 +63,29 @@ export function extractContent(post) {
const {image_link, jsonMetadata} = extractImage(json_metadata, body, author, permlink)
+ const {desc, desc_complete} = getDescription(body, depth);
+
+ return {
+ author,
+ permlink,
+ parent_author,
+ parent_permlink,
+ json_metadata: jsonMetadata,
+ category,
+ title,
+ created,
+ net_rshares,
+ children,
+ url,
+ pending_payout_value,
+ image_link,
+ desc,
+ desc_complete,
+ body
+ };
+}
+
+export const getDescription = (body, depth) => {
let desc;
let desc_complete = false;
@@ -92,27 +115,9 @@ export function extractContent(post) {
}
desc_complete = body2 === desc; // is the entire body in desc?
- return {
- author,
- permlink,
- parent_author,
- parent_permlink,
- json_metadata: jsonMetadata,
- category,
- title,
- created,
- net_rshares,
- children,
- url,
- pending_payout_value,
- image_link,
- desc,
- desc_complete,
- body
- };
-
-
+ return {desc, desc_complete}
}
+
export const slugify = (string) => {
const a = 'àáäâãåèéëêìíïîòóöôùúüûñçßÿœæŕśńṕẃǵǹḿǘẍźḧ·/_,:;'
const b = 'aaaaaaeeeeiiiioooouuuuncsyoarsnpwgnmuxzh------'
diff --git a/client/src/index.js b/client/src/index.js
index 7651d68..7f40ad9 100644
--- a/client/src/index.js
+++ b/client/src/index.js
@@ -2,6 +2,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router } from "react-router-dom";
import { Provider } from 'react-redux';
+import { HelmetProvider } from 'react-helmet-async';
import store from './redux'
import "./index.css";
@@ -17,9 +18,11 @@ import AppRoutes from './routes/Routes';
const renderApp = Component => {
ReactDOM.render(
-
-
-
+
+
+
+
+
,
document.getElementById("root")
)
Comments
+Comments
-