@@ -116,7 +145,7 @@ class InteractionModal extends React.PureComponent {
diff --git a/app/javascript/flavours/glitch/features/ui/components/modal_root.js b/app/javascript/flavours/glitch/features/ui/components/modal_root.js
index 8767840d6..93834f60e 100644
--- a/app/javascript/flavours/glitch/features/ui/components/modal_root.js
+++ b/app/javascript/flavours/glitch/features/ui/components/modal_root.js
@@ -29,6 +29,7 @@ import {
FilterModal,
InteractionModal,
SubscribedLanguagesModal,
+ ClosedRegistrationsModal,
} from 'flavours/glitch/features/ui/util/async-components';
import { Helmet } from 'react-helmet';
@@ -56,6 +57,7 @@ const MODAL_COMPONENTS = {
'FILTER': FilterModal,
'SUBSCRIBED_LANGUAGES': SubscribedLanguagesModal,
'INTERACTION': InteractionModal,
+ 'CLOSED_REGISTRATIONS': ClosedRegistrationsModal,
};
export default class ModalRoot extends React.PureComponent {
diff --git a/app/javascript/flavours/glitch/features/ui/components/sign_in_banner.js b/app/javascript/flavours/glitch/features/ui/components/sign_in_banner.js
index a935d7422..e8023803f 100644
--- a/app/javascript/flavours/glitch/features/ui/components/sign_in_banner.js
+++ b/app/javascript/flavours/glitch/features/ui/components/sign_in_banner.js
@@ -1,13 +1,40 @@
-import React from 'react';
+import React, { useCallback } from 'react';
import { FormattedMessage } from 'react-intl';
+import { useDispatch } from 'react-redux';
import { registrationsOpen } from 'flavours/glitch/initial_state';
+import { openModal } from 'flavours/glitch/actions/modal';
-const SignInBanner = () => (
-
-);
+const SignInBanner = () => {
+ const dispatch = useDispatch();
+
+ const openClosedRegistrationsModal = useCallback(
+ () => dispatch(openModal('CLOSED_REGISTRATIONS')),
+ [dispatch],
+ );
+
+ let signupButton;
+
+ if (registrationsOpen) {
+ signupButton = (
+
+
+
+ );
+ } else {
+ signupButton = (
+
+ );
+ }
+
+ return (
+
+ );
+};
export default SignInBanner;
diff --git a/app/javascript/flavours/glitch/features/ui/util/async-components.js b/app/javascript/flavours/glitch/features/ui/util/async-components.js
index e1a0723e1..025b22e61 100644
--- a/app/javascript/flavours/glitch/features/ui/util/async-components.js
+++ b/app/javascript/flavours/glitch/features/ui/util/async-components.js
@@ -190,6 +190,10 @@ export function SubscribedLanguagesModal () {
return import(/*webpackChunkName: "flavours/glitch/async/modals/subscribed_languages_modal" */'flavours/glitch/features/subscribed_languages_modal');
}
+export function ClosedRegistrationsModal () {
+ return import(/*webpackChunkName: "flavours/glitch/async/modals/closed_registrations_modal" */'flavours/glitch/features/closed_registrations_modal');
+}
+
export function About () {
return import(/*webpackChunkName: "features/glitch/async/about" */'flavours/glitch/features/about');
}