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
@@ -2,7 +2,7 @@ import { Post } from '../../views/post';
import { useTranslation } from 'react-i18next';
import { isAllView } from '../../lib/utils/view-utils';
import { useMultisubMetadata } from '../../hooks/use-default-subplebbits';
import { useLocation, useParams } from 'react-router-dom';
import { useLocation } from 'react-router-dom';
interface DescriptionPostProps {
avatarUrl?: string;
@@ -17,7 +17,7 @@ interface DescriptionPostProps {
const SubplebbitDescription = ({ avatarUrl, createdAt, description, replyCount, shortAddress, subplebbitAddress, title }: DescriptionPostProps) => {
const { t } = useTranslation();
const location = useLocation();
const isInAllView = isAllView(location.pathname, useParams());
const isInAllView = isAllView(location.pathname);
const multisubMetadata = useMultisubMetadata();
const post = {