From b58a838af05489f686906c4877db17eabeb2f02c Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Mon, 6 Feb 2023 20:01:56 +0800 Subject: [PATCH] Forgot to update these --- src/components/media-modal.jsx | 4 ++-- src/pages/public.jsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/media-modal.jsx b/src/components/media-modal.jsx index d69a51c5..d4b08be4 100644 --- a/src/components/media-modal.jsx +++ b/src/components/media-modal.jsx @@ -18,8 +18,8 @@ function MediaModal({ const carouselRef = useRef(null); // NOTE: Optional path segment doesn't work yet // https://github.com/remix-run/react-router/issues/10039 - // const isStatusLocation = useMatch('/s/:instance?/:id'); - const isStatusLocation = useMatch('/s/:instance/:id') || useMatch('/s/:id'); + // const isStatusLocation = useMatch('/:instance?/s/:id'); + const isStatusLocation = useMatch('/:instance/s/:id') || useMatch('/s/:id'); const [currentIndex, setCurrentIndex] = useState(index); const carouselFocusItem = useRef(null); diff --git a/src/pages/public.jsx b/src/pages/public.jsx index a1e03a38..09e350b8 100644 --- a/src/pages/public.jsx +++ b/src/pages/public.jsx @@ -9,7 +9,7 @@ import useTitle from '../utils/useTitle'; const LIMIT = 20; function Public() { - const isLocal = !!useMatch('/p/l/:instance'); + const isLocal = !!useMatch('/:instance/p/l'); const params = useParams(); const { masto, instance } = api({ instance: params.instance }); const title = `${instance} (${isLocal ? 'local' : 'federated'})`;