Browse Source

fix: 🐛

imwald
codytseng 9 months ago
parent
commit
697b8e4663
  1. 3
      src/PageManager.tsx

3
src/PageManager.tsx

@ -94,11 +94,12 @@ export function PageManager({ maxStackSize = 5 }: { maxStackSize?: number }) {
const ignorePopStateRef = useRef(false) const ignorePopStateRef = useRef(false)
useEffect(() => { useEffect(() => {
const hasHistoryState = !!history.state
window.history.pushState(null, '', window.location.href) window.history.pushState(null, '', window.location.href)
if (window.location.pathname !== '/') { if (window.location.pathname !== '/') {
if ( if (
['/users', '/notes', '/relays'].some((path) => window.location.pathname.startsWith(path)) && ['/users', '/notes', '/relays'].some((path) => window.location.pathname.startsWith(path)) &&
!history.state !hasHistoryState
) { ) {
setIsShared(true) setIsShared(true)
} }

Loading…
Cancel
Save