diff --git a/app/components/join-section.hbs b/app/components/join-section.hbs index 5edcbc10..5dfaff7b 100644 --- a/app/components/join-section.hbs +++ b/app/components/join-section.hbs @@ -34,8 +34,20 @@ @route='index' class='join__link join__link--new' @disabled={{true}} - >Join the Squad + > + Join the Squad + + + {{!-- NOTE: This has the new code on feature flag off --}} + {{!-- If something goes wrong, we can enable a flag to restore previous behaviour --}} + {{!-- TODO: Clean up by Jan, 2025 --}}

- We're currently not accepting new applications. Please come back later.

+ {{#if this.isDevMode}} + We're currently not accepting new applications. Please come back later. + {{else}} + + {{/if}} +

+ -{{/if}} \ No newline at end of file +{{/if}} diff --git a/app/components/notice-for-joining.hbs b/app/components/notice-for-joining.hbs new file mode 100644 index 00000000..3a2592d3 --- /dev/null +++ b/app/components/notice-for-joining.hbs @@ -0,0 +1 @@ +We're currently not accepting new applications. Please come back later. \ No newline at end of file diff --git a/app/controllers/subscribe.js b/app/controllers/subscribe.js index 8fef9c36..b24004b0 100644 --- a/app/controllers/subscribe.js +++ b/app/controllers/subscribe.js @@ -15,6 +15,7 @@ export default class SubscribeController extends Controller { @tracked isLoading = false; @tracked showSubscribedMessage = false; @service toast; + @service featureFlag; @tracked isPhoneValid = true; RDS_TWITTER = RDS_TWITTER; @@ -24,6 +25,10 @@ export default class SubscribeController extends Controller { this.userData = this.login.userData; } + get isDevMode() { + return this.featureFlag.isDevMode; + } + get isLoggedIn() { return this.login.isLoggedIn; } diff --git a/app/templates/subscribe.hbs b/app/templates/subscribe.hbs index a1ecb58f..85de72d6 100644 --- a/app/templates/subscribe.hbs +++ b/app/templates/subscribe.hbs @@ -35,7 +35,18 @@ {{else}}

Join the Real Dev Squad Community

-

We're currently not accepting new applications. Please come back later.

+ +

+ {{!-- NOTE: This has the new code on feature flag off. --}} + {{!-- If something goes wrong, we can enable a flag to restore previous behaviour --}} + {{!-- TODO: Clean up by Jan, 2025 --}} + {{#if this.isDevMode}} + We're currently not accepting new applications. Please come back later. + {{else}} + + {{/if}} +

+

Be the first to know when applications open!

{{/if}} diff --git a/tests/integration/components/notice-for-joining-test.js b/tests/integration/components/notice-for-joining-test.js new file mode 100644 index 00000000..995417f2 --- /dev/null +++ b/tests/integration/components/notice-for-joining-test.js @@ -0,0 +1,14 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'website-www/tests/helpers'; +import { render } from '@ember/test-helpers'; +import { hbs } from 'ember-cli-htmlbars'; + +module('Integration | Component | notice-for-joining', function (hooks) { + setupRenderingTest(hooks); + + test('it renders', async function (assert) { + await render(hbs``); + assert.dom().includesText('not accepting'); + assert.dom().includesText('come back later'); + }); +});