Use the same logic as the main login button for the login tooltip in posts

This commit is contained in:
Stefano Pigozzi 2024-10-04 14:03:25 +02:00
parent cbcf5c9b43
commit 02dfa81407
No known key found for this signature in database
GPG key ID: 5ADA3868646C3FC0

View file

@ -44,6 +44,11 @@ import useTitle from '../utils/useTitle';
import getInstanceStatusURL from './../utils/get-instance-status-url'; import getInstanceStatusURL from './../utils/get-instance-status-url';
const {
PHANPY_DEFAULT_INSTANCE: DEFAULT_INSTANCE,
} = import.meta.env;
const LIMIT = 40; const LIMIT = 40;
const SUBCOMMENTS_OPEN_ALL_LIMIT = 10; const SUBCOMMENTS_OPEN_ALL_LIMIT = 10;
const MAX_WEIGHT = 5; const MAX_WEIGHT = 5;
@ -788,7 +793,7 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
not possible. not possible.
</Trans> </Trans>
</p> </p>
<Link to="/login" class="button"> <Link to={DEFAULT_INSTANCE ? `/login?instance=${DEFAULT_INSTANCE}&submit=1` : '/login'} class="button">
<Trans>Log in</Trans> <Trans>Log in</Trans>
</Link> </Link>
</div> </div>