From 302a22d597b6942fd6e5d9d62662adac2aea4e4f Mon Sep 17 00:00:00 2001 From: vinit717 Date: Fri, 30 Aug 2024 21:58:43 +0530 Subject: [PATCH 1/2] chore: fix join discord button --- app/components/stepper.hbs | 2 +- app/components/stepper.js | 7 ------- app/controllers/join.js | 7 +++++++ app/templates/join.hbs | 3 ++- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/components/stepper.hbs b/app/components/stepper.hbs index 2f6ba215..d9982fb9 100644 --- a/app/components/stepper.hbs +++ b/app/components/stepper.hbs @@ -39,7 +39,7 @@ {{/if}} diff --git a/app/components/stepper.js b/app/components/stepper.js index 91f2a5a1..c534ead6 100644 --- a/app/components/stepper.js +++ b/app/components/stepper.js @@ -103,11 +103,4 @@ export default class StepperComponent extends Component { ); } } - - @action async joinDiscordHandler() { - const inviteLink = await this.onboarding.discordInvite(); - if (inviteLink) { - window.open(`https://${inviteLink}`, '_blank'); - } - } } diff --git a/app/controllers/join.js b/app/controllers/join.js index a0caad09..05568b30 100644 --- a/app/controllers/join.js +++ b/app/controllers/join.js @@ -70,4 +70,11 @@ export default class JoinController extends Controller { this.isLoading = false; } } + + @action async joinDiscordHandler() { + const inviteLink = await this.onboarding.discordInvite(); + if (inviteLink) { + window.open(`https://${inviteLink}`, '_blank'); + } + } } diff --git a/app/templates/join.hbs b/app/templates/join.hbs index a7d64655..82762a85 100644 --- a/app/templates/join.hbs +++ b/app/templates/join.hbs @@ -46,7 +46,8 @@ @handleGenerateChaincode={{this.handleGenerateChaincode}} /> {{else}} - + {{/if}} {{/if}} {{/if}} From 6eaec5bc860953c8d05ac7d367d8baefa30a8a47 Mon Sep 17 00:00:00 2001 From: vinit717 Date: Fri, 30 Aug 2024 23:18:34 +0530 Subject: [PATCH 2/2] chore: fix spelling --- app/components/stepper-signup.hbs | 2 +- app/components/stepper-signup.js | 2 +- app/controllers/join.js | 2 +- app/templates/join.hbs | 4 ++-- tests/integration/components/status-card-test.js | 12 ++++++------ 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/components/stepper-signup.hbs b/app/components/stepper-signup.hbs index de16fd89..e0446dc3 100644 --- a/app/components/stepper-signup.hbs +++ b/app/components/stepper-signup.hbs @@ -87,7 +87,7 @@ {{/if}} diff --git a/app/components/stepper-signup.js b/app/components/stepper-signup.js index 6a5db272..82fd2a63 100644 --- a/app/components/stepper-signup.js +++ b/app/components/stepper-signup.js @@ -114,7 +114,7 @@ export default class StepperSignupComponent extends Component { } } - @action async joinDiscordHandler() { + @action async joinDiscordAction() { const inviteLink = await this.onboarding.discordInvite(); if (inviteLink) { window.open(`https://${inviteLink}`, '_blank'); diff --git a/app/controllers/join.js b/app/controllers/join.js index 05568b30..cda0a8d6 100644 --- a/app/controllers/join.js +++ b/app/controllers/join.js @@ -71,7 +71,7 @@ export default class JoinController extends Controller { } } - @action async joinDiscordHandler() { + @action async joinDiscordAction() { const inviteLink = await this.onboarding.discordInvite(); if (inviteLink) { window.open(`https://${inviteLink}`, '_blank'); diff --git a/app/templates/join.hbs b/app/templates/join.hbs index 82762a85..670c6cb6 100644 --- a/app/templates/join.hbs +++ b/app/templates/join.hbs @@ -35,7 +35,7 @@ {{else}} {{#if this.isDevMode}} @@ -47,7 +47,7 @@ /> {{else}} + @joinDiscord={{this.joinDiscordAction}} /> {{/if}} {{/if}} {{/if}} diff --git a/tests/integration/components/status-card-test.js b/tests/integration/components/status-card-test.js index 2c1ab781..27676e90 100644 --- a/tests/integration/components/status-card-test.js +++ b/tests/integration/components/status-card-test.js @@ -17,7 +17,7 @@ module('Integration | Component | status-card', function (hooks) { setupRenderingTest(hooks); hooks.beforeEach(function () { - this.set('joinDiscordHandler', () => { + this.set('joinDiscordAction', () => { window.open = this.spy(); }); this.set('ANKUSH_TWITTER', ANKUSH_TWITTER); @@ -34,7 +34,7 @@ module('Integration | Component | status-card', function (hooks) { `); @@ -63,7 +63,7 @@ module('Integration | Component | status-card', function (hooks) { `); @@ -91,7 +91,7 @@ module('Integration | Component | status-card', function (hooks) { `); @@ -116,7 +116,7 @@ module('Integration | Component | status-card', function (hooks) { `); @@ -138,7 +138,7 @@ module('Integration | Component | status-card', function (hooks) { `);