Skip to content

Commit

Permalink
fix(eo, landing-page): remove condition if user is logged in (#3803)
Browse files Browse the repository at this point in the history
  • Loading branch information
frontend-specialisten authored Dec 2, 2024
1 parent 403d051 commit 92b706a
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions libs/eo/landing-page/shell/src/lib/login-button.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,21 @@ import { translations } from '@energinet-datahub/eo/translations';
@if (type() === 'default') {
<button class="button primary" (click)="onClick()">
<watt-icon name="login" />
@if (isLoggedIn()) {
{{ translations.loginButton.authenticated | transloco }}
} @else {
{{ translations.loginButton.unauthenticated | transloco }}
}
{{ translations.loginButton.unauthenticated | transloco }}
</button>
} @else {
<watt-button variant="text" class="login" data-testid="login-button" (click)="onClick()">
@if (isLoggedIn()) {
{{ translations.loginButton.authenticated | transloco }}
} @else {
{{ translations.loginButton.unauthenticated | transloco }}
}
{{ translations.loginButton.unauthenticated | transloco }}
</watt-button>
}
`,
})
export class EoLoginButtonComponent {
type = input<'text' | 'default'>('default');

private authService = inject(EoAuthService);
private destroyRef = inject(DestroyRef);
private window = inject(WindowService).nativeWindow;
private readonly authService = inject(EoAuthService);
private readonly destroyRef = inject(DestroyRef);
private readonly window = inject(WindowService).nativeWindow;

protected translations = translations;
protected isLoggedIn!: WritableSignal<boolean>;
Expand Down

0 comments on commit 92b706a

Please sign in to comment.