diff --git a/packages/dashboard-v2/src/components/forms/SignUpForm.js b/packages/dashboard-v2/src/components/forms/SignUpForm.js index 976c0c74..6725c673 100644 --- a/packages/dashboard-v2/src/components/forms/SignUpForm.js +++ b/packages/dashboard-v2/src/components/forms/SignUpForm.js @@ -61,11 +61,6 @@ export const SignUpForm = ({ onSuccess, onFailure }) => ( > {({ errors, touched }) => (
-
-

Create your free account

-

Includes 100 GB storage at basic speed

-
- ( +
+

Create your free account

+

Includes 100 GB storage at basic speed

+
+); + +const PaidPortalHeader = () => ( +
+

Create your account

+

+ If you're looking for a free portal, try{" "} + + SkynetFree.net + {" "} + with 100GB of free storage. +

+
+); const State = { Pure: "PURE", @@ -14,34 +36,44 @@ const State = { const SignUpPage = () => { const [state, setState] = useState(State.Pure); + const { settings } = usePortalSettings(); useEffect(() => { if (state === State.Success) { - const timer = setTimeout(() => navigate("/"), 3000); + const timer = setTimeout(() => navigate(settings.isSubscriptionRequired ? "/upgrade" : "/"), 3000); return () => clearTimeout(timer); } - }, [state]); + }, [state, settings.isSubscriptionRequired]); return (
Skynet
- {state !== State.Success && ( - setState(State.Success)} onFailure={() => setState(State.Failure)} /> - )} - {state === State.Success && ( -
-

Please check your inbox and confirm your email address.

-

You will be redirected to your dashboard shortly.

- Click here to go there now. -
- )} + {!settings.areAccountsEnabled && Sorry, registrations are currently disabled.} - {state === State.Failure && ( -

Something went wrong, please try again later.

+ {settings.areAccountsEnabled && ( + <> + {settings.isSubscriptionRequired ? : } + + {state !== State.Success && ( + setState(State.Success)} onFailure={() => setState(State.Failure)} /> + )} + + {state === State.Success && ( +
+

Please check your inbox and confirm your email address.

+

You will be redirected to your dashboard shortly.

+ Click here to go there now. +
+ )} + + {state === State.Failure && ( +

Something went wrong, please try again later.

+ )} + )}