Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iamareebjamal committed Nov 7, 2020
1 parent f48c4b8 commit 4e0cf70
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/components/forms/wizard/other-details-step.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export default Component.extend(FormMixin, EventWizardMixin, {

currentTimezone : moment.tz.guess(),
timezones,
site: 'twitter',
testLink : 'https://twitter.com/iamareebjamal',
site : 'twitter',
testLink : 'https://twitter.com/iamareebjamal',

torii: service(),

Expand Down
8 changes: 4 additions & 4 deletions app/components/widgets/forms/social-link-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ interface Args {

export default class SocialLinkField extends Component<Args> {
@tracked
site: string = 'website';
site = 'website';

get sites(): SocialMedia[] {
return [
{
name: 'Website',
identifier: 'website'
name : 'Website',
identifier : 'website'
},
...socialMediaSites
]
];
}

get prefix(): string | undefined {
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default class RegisterController extends Controller {
this.model.save()
.then(user => {
this.set('session.newUser', user.get('email'));
this.send('loginExistingUser', user.get('email'), password, this.inviteToken, this.event);
this.send('loginExistingUser', user.get('email'), password, this.inviteToken, this.event);
})
.catch(reason => {
if (reason && Object.prototype.hasOwnProperty.call(reason, 'errors') && reason.errors[0].status === 409) {
Expand Down
10 changes: 5 additions & 5 deletions app/utils/dictionary/social-media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ export const socialMediaNames = ['Twitter', 'Facebook', 'Instagram', 'Linkedin',

const identifierOverrides: { [key: string]: string } = {
'Google Groups': 'groups.google'
}
};

export const socialMediaIdentifiers = socialMediaNames.map(name => {
return identifierOverrides[name] ?? name.toLowerCase()
return identifierOverrides[name] ?? name.toLowerCase();
});

const prefixOverrides: { [key: string]: string } = {};
Expand All @@ -18,13 +18,13 @@ export interface SocialMedia {

export const socialMediaSites: SocialMedia[] = socialMediaIdentifiers.map((identifier, index) => ({
identifier,
name: socialMediaNames[index],
prefix: prefixOverrides[identifier] ?? `https://${identifier}.com/`
name : socialMediaNames[index],
prefix : prefixOverrides[identifier] ?? `https://${identifier}.com/`
}));

export interface SocialMediaMap { [key: string]: SocialMedia }

export const socialMediaMap: SocialMediaMap = socialMediaIdentifiers.reduce((obj: SocialMediaMap, identifier, index) => {
obj[identifier] = socialMediaSites[index];
return obj
return obj;
}, {});

0 comments on commit 4e0cf70

Please sign in to comment.