mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
add route validation checks
This commit is contained in:
@@ -35,7 +35,7 @@ const Board = () => {
|
||||
const { subplebbitAddress } = useParams<{ subplebbitAddress: string }>();
|
||||
const { hideThreadsWithoutImages } = useInterfaceSettingsStore();
|
||||
|
||||
const isInAllView = isAllView(location.pathname, useParams());
|
||||
const isInAllView = isAllView(location.pathname);
|
||||
const defaultSubplebbitAddresses = useDefaultSubplebbitAddresses();
|
||||
|
||||
const account = useAccount();
|
||||
|
||||
@@ -33,7 +33,7 @@ const Catalog = () => {
|
||||
const location = useLocation();
|
||||
const { subplebbitAddress } = useParams<{ subplebbitAddress: string }>();
|
||||
|
||||
const isInAllView = isAllView(location.pathname, useParams());
|
||||
const isInAllView = isAllView(location.pathname);
|
||||
const defaultSubplebbits = useDefaultSubplebbits();
|
||||
const { hideAdultBoards, hideGoreBoards } = useInterfaceSettingsStore();
|
||||
const { hideThreadsWithoutImages } = useInterfaceSettingsStore();
|
||||
@@ -153,7 +153,7 @@ const Catalog = () => {
|
||||
</div>
|
||||
);
|
||||
|
||||
const params = useParams();
|
||||
const params = useParams<{ sortType?: string; timeFilterName?: string }>();
|
||||
const currentTimeFilterName = params?.timeFilterName || timeFilterName;
|
||||
|
||||
const Footer = () => {
|
||||
|
||||
@@ -55,7 +55,7 @@ const PostPage = () => {
|
||||
const params = useParams();
|
||||
const location = useLocation();
|
||||
const { commentCid, subplebbitAddress } = params;
|
||||
const isInAllView = isAllView(location.pathname, params);
|
||||
const isInAllView = isAllView(location.pathname);
|
||||
const isInSettigsView = isSettingsView(location.pathname, params);
|
||||
const isInDescriptionView = isDescriptionView(location.pathname, params);
|
||||
const isInRulesView = isRulesView(location.pathname, params);
|
||||
|
||||
Reference in New Issue
Block a user