diff --git a/src/features/auth-login/components/registration-page.tsx b/src/features/auth-login/components/registration-page.tsx index 7f1e81ce5..ea57c9e5e 100644 --- a/src/features/auth-login/components/registration-page.tsx +++ b/src/features/auth-login/components/registration-page.tsx @@ -2,10 +2,29 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; import { BigCard } from 'soapbox/components/big-card'; +import { Text } from 'soapbox/components/ui'; +import { useInstance, useRegistrationStatus } from 'soapbox/hooks'; import RegistrationForm from './registration-form'; const RegistrationPage: React.FC = () => { + const instance = useInstance(); + const { isOpen } = useRegistrationStatus(); + + if (!isOpen) { + return ( + }> + + + + + ); + } + return ( }> diff --git a/src/hooks/useRegistrationStatus.ts b/src/hooks/useRegistrationStatus.ts index 0f1242d1e..aac5efef6 100644 --- a/src/hooks/useRegistrationStatus.ts +++ b/src/hooks/useRegistrationStatus.ts @@ -6,7 +6,7 @@ export const useRegistrationStatus = () => { const features = useFeatures(); return { - /** Registrations are open, either through Pepe or traditional account creation. */ + /** Registrations are open. */ isOpen: features.accountCreation && instance.registrations, }; }; \ No newline at end of file