2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-07 06:00:57 +00:00

fix(frontend): logic error in display of registration option (#9930)

* fix(frontend): logic error in display of registration option
Fixes #9921

* simplify logic
This commit is contained in:
Matthias Mair
2025-07-02 01:27:49 +02:00
committed by GitHub
parent e6f91517c3
commit 252c74ab9f

View File

@ -40,8 +40,7 @@ export default function Login() {
state.registration_enabled
])
);
const both_reg_enabled =
registration_enabled() || sso_registration() || false;
const any_reg_enabled = registration_enabled() || sso_registration() || false;
const LoginMessage = useMemo(() => {
const val = server.customize?.login_message;
@ -109,7 +108,7 @@ export default function Login() {
) : (
<>
<AuthenticationForm />
{both_reg_enabled === false && (
{any_reg_enabled && (
<Text ta='center' size={'xs'} mt={'md'}>
<Trans>Don&apos;t have an account?</Trans>{' '}
<Anchor