diff --git a/src/pages/status.jsx b/src/pages/status.jsx index c22e6bc0..8d3a488e 100644 --- a/src/pages/status.jsx +++ b/src/pages/status.jsx @@ -40,8 +40,12 @@ function resetScrollPosition(id) { function StatusPage() { const { id, ...params } = useParams(); - const { masto, instance, authenticated } = api({ instance: params.instance }); - const { masto: currentMasto, instance: currentInstance } = api(); + const { masto, instance } = api({ instance: params.instance }); + const { + masto: currentMasto, + instance: currentInstance, + authenticated, + } = api(); const sameInstance = instance === currentInstance; const navigate = useNavigate(); const snapStates = useSnapshot(states); @@ -622,55 +626,59 @@ function StatusPage() { size="l" /> - {!sameInstance && uiState !== 'loading' && ( + {uiState !== 'loading' && !authenticated ? (

- This post is from another instance ( - {instance}). Interactions (reply, boost, etc) - are not possible. + You're not logged in. Interactions (reply, boost, + etc) are not possible.

- + + Log in +
- )} - {sameInstance && - !authenticated && - uiState !== 'loading' && ( + ) : ( + !sameInstance && (

- You're not logged in. Interactions (reply, boost, + This post is from another instance ( + {instance}). Interactions (reply, boost, etc) are not possible.

- - Log in - +
- )} + ) + )} ) : (