add route validation checks

This commit is contained in:
Tom (plebeius.eth)
2024-10-29 17:40:09 +01:00
parent b123102988
commit 6692c65c4b
19 changed files with 86 additions and 87 deletions
@@ -59,7 +59,7 @@ const ViewOnButtons = ({ cid, isDescription, isRules, subplebbitAddress, onClose
const { t } = useTranslation();
const location = useLocation();
const params = useParams();
const isInAllView = isAllView(location.pathname, params);
const isInAllView = isAllView(location.pathname);
const isInSubscriptionsView = isSubscriptionsView(location.pathname, params);
const getViewOnOtherClientLink = () => {
+2 -2
View File
@@ -36,7 +36,7 @@ const PostInfoAndMedia = ({ openReplyModal, post, postReplyCount = 0, roles }: P
const params = useParams();
const location = useLocation();
const isInAllView = isAllView(location.pathname, params);
const isInAllView = isAllView(location.pathname);
const isInPostPageView = isPostPageView(location.pathname, params);
const isInSubscriptionsView = isSubscriptionsView(location.pathname, params);
@@ -349,7 +349,7 @@ const PostMobile = ({ openReplyModal, post, roles, showAllReplies, showReplies =
const { isDescription, isRules } = post || {}; // custom properties, not from api
const params = useParams();
const location = useLocation();
const isInAllView = isAllView(location.pathname, params);
const isInAllView = isAllView(location.pathname);
const isInPendingPostView = isPendingPostView(location.pathname, params);
const isInPostView = isPostPageView(location.pathname, params);
const linksCount = useCountLinksInReplies(post);