- [
-
- handleSubscribe()}>
- {subscribed ? "Unsubscribe" : "Subscribe"}
+ {anonymousMode ? null : (
+ <>
+
+ [
+
+ handleSubscribe()}>
+ {subscribed ? "Unsubscribe" : "Subscribe"}
+
+
+ ]
-
- ]
-
-
- handleSubscribe()}>
- {subscribed ? "Unsubscribe" : "Subscribe"}
-
-
+
+ handleSubscribe()}>
+ {subscribed ? "Unsubscribe" : "Subscribe"}
+
+
+ >
+ )}
>
) : (
@@ -1987,8 +1997,12 @@ const Board = () => {
[
All
- /
- Subscriptions
+ {anonymousMode ? null :
+ <>
+ /
+ Subscriptions
+ >
+ }
]
{defaultSubplebbits.map((subplebbit, index) => (
diff --git a/src/components/views/Catalog.jsx b/src/components/views/Catalog.jsx
index ee9f3d7d..7e70494f 100755
--- a/src/components/views/Catalog.jsx
+++ b/src/components/views/Catalog.jsx
@@ -7,7 +7,6 @@ import { confirmAlert } from 'react-confirm-alert';
import { Tooltip } from 'react-tooltip';
import { useAccount, useFeed, usePublishComment, usePublishCommentEdit, useSubplebbit, useSubscribe } from '@plebbit/plebbit-react-hooks';
import { debounce } from 'lodash';
-import useGeneralStore from '../../hooks/stores/useGeneralStore';
import { Container, NavBar, Header, Break, PostForm, PostFormLink, PostFormTable, PostMenu, BoardForm } from '../styled/views/Board.styled';
import { Threads, PostMenuCatalog } from '../styled/views/Catalog.styled';
import { TopBar, Footer, AuthorDeleteAlert } from '../styled/views/Thread.styled';
@@ -24,13 +23,14 @@ import useClickForm from '../../hooks/useClickForm';
import useError from '../../hooks/useError';
import useStateString from '../../hooks/useStateString';
import useSuccess from '../../hooks/useSuccess';
+import useAnonModeStore from '../../hooks/stores/useAnonModeStore';
+import useGeneralStore from '../../hooks/stores/useGeneralStore';
import packageJson from '../../../package.json'
const {version} = packageJson
const Catalog = () => {
const {
- anonymousMode,
captchaResponse, setCaptchaResponse,
setChallengesArray,
defaultSubplebbits,
@@ -51,6 +51,8 @@ const Catalog = () => {
showPostForm,
showPostFormLink,
} = useGeneralStore(state => state);
+
+ const { anonymousMode } = useAnonModeStore();
const nameRef = useRef();
const subjectRef = useRef();
@@ -82,8 +84,6 @@ const Catalog = () => {
useAnonMode(selectedThread, anonymousMode && executeAnonMode);
-
-
const { feed, hasMore, loadMore } = useFeed({subplebbitAddresses: [`${selectedAddress}`], sortType: 'active'});
const { subplebbitAddress } = useParams();
const subplebbit = useSubplebbit({subplebbitAddress: selectedAddress});
@@ -475,8 +475,12 @@ const Catalog = () => {
[
All
+ {anonymousMode ? null :
+ <>
/
- Subscriptions
+ Subscriptions
+ >
+ }
] [
{defaultSubplebbits.map((subplebbit, index) => (
@@ -513,7 +517,7 @@ const Catalog = () => {
{feed.length > 0 ? (
<>
-
- [
-
- handleSubscribe()}>
- {subscribed ? "Unsubscribe" : "Subscribe"}
+ {anonymousMode ? null : (
+ <>
+
+ [
+
+ handleSubscribe()}>
+ {subscribed ? "Unsubscribe" : "Subscribe"}
+
+
+ ]
-
- ]
-
-
- handleSubscribe()}>
- {subscribed ? "Unsubscribe" : "Subscribe"}
-
-
+
+ handleSubscribe()}>
+ {subscribed ? "Unsubscribe" : "Subscribe"}
+
+
+ >
+ )}
>
) : (
@@ -863,8 +871,12 @@ const Catalog = () => {
[
All
- /
- Subscriptions
+ {anonymousMode ? null :
+ <>
+ /
+ Subscriptions
+ >
+ }
]
{defaultSubplebbits.map((subplebbit, index) => (
diff --git a/src/components/views/Home.jsx b/src/components/views/Home.jsx
index ea97bb7d..dd301cc5 100644
--- a/src/components/views/Home.jsx
+++ b/src/components/views/Home.jsx
@@ -1,11 +1,12 @@
import React, { Fragment, useEffect, useRef } from 'react';
import { Helmet } from 'react-helmet-async';
import { useAccount } from '@plebbit/plebbit-react-hooks';
-import useGeneralStore from '../../hooks/stores/useGeneralStore';
import { Link, useNavigate } from 'react-router-dom';
import { Container, Header, Logo, Page, Search, About, AboutTitle, AboutContent, Boards, BoardsTitle, BoardsContent, Footer } from '../styled/views/Home.styled';
import BoardAvatar from '../BoardAvatar';
import OfflineIndicator from '../OfflineIndicator';
+import useAnonModeStore from '../../hooks/stores/useAnonModeStore';
+import useGeneralStore from '../../hooks/stores/useGeneralStore';
import packageJson from '../../../package.json'
import { Tooltip } from 'react-tooltip';
const {version} = packageJson
@@ -14,13 +15,15 @@ const commitRef = process?.env?.REACT_APP_COMMIT_REF ? ` ${process.env.REACT_APP
const Home = () => {
- const {
+ const {
bodyStyle, setBodyStyle,
defaultSubplebbits,
setSelectedAddress,
selectedStyle, setSelectedStyle,
setSelectedTitle
} = useGeneralStore(state => state);
+
+ const { anonymousMode } = useAnonModeStore();
const account = useAccount();
const navigate = useNavigate();
@@ -102,7 +105,7 @@ const Home = () => {
- {account?.subscriptions?.length > 0 ? (
+ {account?.subscriptions?.length > 0 && !anonymousMode ? (
Subscriptions
diff --git a/src/components/views/Thread.jsx b/src/components/views/Thread.jsx
index 588d5847..fd6a873a 100755
--- a/src/components/views/Thread.jsx
+++ b/src/components/views/Thread.jsx
@@ -7,7 +7,6 @@ import { Tooltip } from 'react-tooltip';
import { useAccount, useAccountComments, useComment, usePublishComment, usePublishCommentEdit, useSubplebbit } from '@plebbit/plebbit-react-hooks';
import { flattenCommentsPages } from '@plebbit/plebbit-react-hooks/dist/lib/utils'
import { debounce } from 'lodash';
-import useGeneralStore from '../../hooks/stores/useGeneralStore';
import { Container, NavBar, Header, Break, PostForm, PostFormTable, PostMenu } from '../styled/views/Board.styled';
import { ReplyFormLink, TopBar, BottomBar, BoardForm, Footer, AuthorDeleteAlert } from '../styled/views/Thread.styled';
import { PostMenuCatalog } from '../styled/views/Catalog.styled';
@@ -36,14 +35,15 @@ import useAnonMode from '../../hooks/useAnonMode';
import useClickForm from '../../hooks/useClickForm';
import useError from '../../hooks/useError';
import useStateString from '../../hooks/useStateString';
-import packageJson from '../../../package.json'
import useSuccess from '../../hooks/useSuccess';
+import useAnonModeStore from '../../hooks/stores/useAnonModeStore';
+import useGeneralStore from '../../hooks/stores/useGeneralStore';
+import packageJson from '../../../package.json'
const {version} = packageJson
const Thread = () => {
const {
- anonymousMode,
captchaResponse, setCaptchaResponse,
setChallengesArray,
defaultSubplebbits,
@@ -67,6 +67,8 @@ const Thread = () => {
showPostFormLink,
} = useGeneralStore(state => state);
+ const { anonymousMode } = useAnonModeStore();
+
const account = useAccount();
const navigate = useNavigate();
const handleClickForm = useClickForm();
@@ -530,8 +532,12 @@ const Thread = () => {
[
All
- /
- Subscriptions
+ {anonymousMode ? null :
+ <>
+ /
+ Subscriptions
+ >
+ }
] [
{defaultSubplebbits.map((subplebbit, index) => (
@@ -568,7 +574,7 @@ const Thread = () => {