diff --git a/src/client/app/Sidebar/RightSidebar.js b/src/client/app/Sidebar/RightSidebar.js index 4efa5c6280..76095b5ff7 100644 --- a/src/client/app/Sidebar/RightSidebar.js +++ b/src/client/app/Sidebar/RightSidebar.js @@ -83,12 +83,6 @@ export default class RightSidebar extends React.Component { } } const isWitnessVoted = checkVote(); - const { category } = match.params; - const displayUlogCaption = - category && - category.match( - /^(ulog-quotes|ulog-howto|ulog-diy|ulog-surpassinggoogle|teardrops|untalented|ulog-ned|ulography|ulog-gratefulvibes|ulog-resolutions|ulog-memes|ulog-blocktrades|ulog-showerthoughts|ulog-snookmademedoit|ulog-utopian|ulog-thejohalfiles|ulogifs|ulog-surfyogi|ulog-bobbylee|ulog-stellabelle|ulog-sweetsssj|ulog-dimimp|ulog-teamsteem|ulog-kusknee|ulog-papapepper|ulog-steemjet)$/, - ); return (
diff --git a/src/client/components/Sidebar/FeedSidebar.js b/src/client/components/Sidebar/FeedSidebar.js index 4315ca81c3..3c15748921 100644 --- a/src/client/components/Sidebar/FeedSidebar.js +++ b/src/client/components/Sidebar/FeedSidebar.js @@ -14,6 +14,7 @@ import CryptoTrendingCharts from './CryptoTrendingCharts'; import ChatBar from '../../components/Sidebar/ChatBar'; import UlogGamesExchanges from '../../components/Sidebar/UlogGamesExchanges'; import UlogCaption from '../../feed/UlogCaption'; +import UlogGenericCaption from '../../feed/UlogGenericCaption'; @connect( state => ({ @@ -52,11 +53,13 @@ class FeedSidebar extends React.Component { tag.match( /^(ulog-quotes|ulog-howto|ulog-diy|ulog-surpassinggoogle|teardrops|untalented|ulog-ned|ulography|ulog-gratefulvibes|ulog-resolutions|ulog-memes|ulog-blocktrades|ulog-showerthoughts|ulog-snookmademedoit|ulog-utopian|ulog-thejohalfiles|ulogifs|ulog-surfyogi|ulog-bobbylee|ulog-stellabelle|ulog-sweetsssj|ulog-dimimp|ulog-teamsteem|ulog-kusknee|ulog-papapepper|ulog-steemjet)$/, ); + const isStartsWithUlog = tag && tag.startsWith('ulog-'); return (
{!_.isEmpty(currentCrypto) && } {displayUlogCaption && } + {(!displayUlogCaption && isStartsWithUlog) && } diff --git a/src/client/feed/Page.js b/src/client/feed/Page.js index 3d0ec1dd10..b8d0f00a19 100644 --- a/src/client/feed/Page.js +++ b/src/client/feed/Page.js @@ -139,8 +139,8 @@ class Page extends React.Component { ) : ( )} - {displayUlogCaption && } - {(!displayUlogCaption && isStartsWithUlog) && } + {(authenticated && displayUlogCaption) && } + {(authenticated && !displayUlogCaption && isStartsWithUlog) && }
diff --git a/src/client/feed/UlogGenericCaption.js b/src/client/feed/UlogGenericCaption.js new file mode 100644 index 0000000000..e342976ad9 --- /dev/null +++ b/src/client/feed/UlogGenericCaption.js @@ -0,0 +1,52 @@ +/* eslint-disable react/no-unescaped-entities */ + +import React from 'react'; +import PropTypes from 'prop-types'; +import { Collapse, Button, Icon } from 'antd'; +import { injectIntl, FormattedMessage } from 'react-intl'; +import ReactMarkdown from 'react-markdown'; +import { generic } from '../helpers/ulogCaptions'; + +@injectIntl +class UlogGenericCaption extends React.Component { + static propTypes = { + category: PropTypes.string.isRequired, + }; + + constructor(props) { + super(props); + } + + render() { + const category = this.props.category; + const about = `About #${category}`; + + return ( +
+ + + +
+ +
+
+
+
+ ); + } +} + +export default UlogGenericCaption; diff --git a/src/client/helpers/ulogCaptions.js b/src/client/helpers/ulogCaptions.js new file mode 100644 index 0000000000..4b0ecf7e7d --- /dev/null +++ b/src/client/helpers/ulogCaptions.js @@ -0,0 +1,7 @@ + +export const generic = `This is an empty #ulog-community.   + Would you like to create a community with it?   +   + Click on **Post Now** below!`; + +export default null; \ No newline at end of file