Forgot to update these

This commit is contained in:
Lim Chee Aun 2023-02-06 20:01:56 +08:00
parent 7e5c3f1bac
commit b58a838af0
2 changed files with 3 additions and 3 deletions

View file

@ -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);

View file

@ -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'})`;