Skip to content

Commit

Permalink
fix(disable_user_signups): hide create account link under flag
Browse files Browse the repository at this point in the history
  • Loading branch information
AmruthPillai committed Mar 18, 2022
1 parent b6267d0 commit 80acfe9
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions client/modals/auth/LoginModal.tsx
Expand Up @@ -12,6 +12,7 @@ import toast from 'react-hot-toast';
import { useIsMutating, useMutation } from 'react-query';

import BaseModal from '@/components/shared/BaseModal';
import { FLAG_DISABLE_SIGNUPS } from '@/constants/flags';
import { login, LoginParams, loginWithGoogle, LoginWithGoogleParams } from '@/services/auth';
import { ServerError } from '@/services/axios';
import { useAppDispatch, useAppSelector } from '@/store/hooks';
Expand Down Expand Up @@ -167,11 +168,13 @@ const LoginModal: React.FC = () => {
/>
</form>

<p className="text-xs">
<Trans t={t} i18nKey="modals.auth.login.register-text">
If you don&apos;t have one, you can <a onClick={handleCreateAccount}>create an account</a> here.
</Trans>
</p>
{!FLAG_DISABLE_SIGNUPS && (
<p className="text-xs">
<Trans t={t} i18nKey="modals.auth.login.register-text">
If you don&apos;t have one, you can <a onClick={handleCreateAccount}>create an account</a> here.
</Trans>
</p>
)}

<p className="text-xs">
<Trans t={t} i18nKey="modals.auth.login.recover-text">
Expand Down

0 comments on commit 80acfe9

Please sign in to comment.