Skip to content

Commit

Permalink
Added missing Id
Browse files Browse the repository at this point in the history
Signed-off-by: Amol Sontakke <amols@proximabiz.com>
  • Loading branch information
amolsontakke3576 committed Jan 26, 2023
1 parent 3c58e1b commit e37e1f5
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/app/shared/services/lfx-header.service.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// Copyright The Linux Foundation and each contributor to CommunityBridge.
// SPDX-License-Identifier: MIT

import { Injectable } from "@angular/core";
import { AuthService } from "./auth.service";
import { EnvConfig } from "../../config/cla-env-utils";
import { AppSettings } from "../../config/app-settings";
import { Injectable } from '@angular/core';
import { AuthService } from './auth.service';
import { EnvConfig } from '../../config/cla-env-utils';
import { AppSettings } from '../../config/app-settings';

const script = document.createElement("script");
script.setAttribute("src", EnvConfig.default[AppSettings.LFX_HEADER]);
const script = document.createElement('script');
script.setAttribute('src', EnvConfig.default[AppSettings.LFX_HEADER]);
document.head.appendChild(script);

@Injectable({
providedIn: "root",
providedIn: 'root',
})
export class LfxHeaderService {
links: any[];
Expand All @@ -25,32 +25,32 @@ export class LfxHeaderService {
setLinks() {
this.links = [
{
title: "Project Login",
title: 'Project Login',
url: EnvConfig.default[AppSettings.PROJECT_CONSOLE_LINK_V2],
},
{
title: "CLA Manager Login",
title: 'CLA Manager Login',
url: EnvConfig.default[AppSettings.CORPORATE_CONSOLE_LINK_V2],
},
{
title: "Developer",
title: 'Developer',
url: AppSettings.LEARN_MORE,
},
];
const element: any = document.getElementById("lfx-header-v2");
const element: any = document.getElementById('lfx-header-v2');
element.links = this.links;
}

setCallBackUrl() {
const lfHeaderEl: any = document.getElementById("lfx-header-v2");
const lfHeaderEl: any = document.getElementById('lfx-header-v2');
if (lfHeaderEl) {
lfHeaderEl.callbackurl = this.auth.auth0Options.callbackUrl;
}
}

setUserInLFxHeader(): void {
setTimeout(() => {
const lfHeaderEl: any = document.getElementById("lfx-header-v2");
const lfHeaderEl: any = document.getElementById('lfx-header-v2');
if (lfHeaderEl) {
this.auth.userProfile$.subscribe((data) => {
if (data) {
Expand Down

0 comments on commit e37e1f5

Please sign in to comment.