diff --git a/src/pages/mentions.jsx b/src/pages/mentions.jsx index a57d9e2e..6403d188 100644 --- a/src/pages/mentions.jsx +++ b/src/pages/mentions.jsx @@ -1,4 +1,4 @@ -import { useMemo, useRef } from 'preact/hooks'; +import { useMemo, useRef, useState } from 'preact/hooks'; import { useSearchParams } from 'react-router-dom'; import Link from '../components/link'; @@ -14,7 +14,8 @@ function Mentions({ columnMode, ...props }) { useTitle('Mentions', '/mentions'); const { masto, instance } = api(); const [searchParams] = columnMode ? [emptySearchParams] : useSearchParams(); - const type = props?.type || searchParams.get('type'); + const [stateType, setStateType] = useState(null); + const type = props?.type || searchParams.get('type') || stateType; const mentionsIterator = useRef(); const latestItem = useRef(); @@ -127,12 +128,27 @@ function Mentions({ columnMode, ...props }) { const TimelineStart = useMemo(() => { return (