Skip to content

Commit fee9e8f

Browse files
committed
fix(tos banner): code updates
1 parent 7ef46e1 commit fee9e8f

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/app/features/home/pages/dashboard/dashboard.component.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
[buttonLabel]="'home.loggedIn.dashboard.createProject' | translate"
1111
(buttonClick)="createProject()"
1212
/>
13-
<osf-tos-consent-banner [termsLink]="'/terms-of-use'" [privacyLink]="'/privacy-policy'"></osf-tos-consent-banner>
13+
<osf-tos-consent-banner></osf-tos-consent-banner>
14+
1415
<div>
1516
<div class="quick-search-container py-4 px-3 md:px-4">
1617
<p class="text-center mb-4 xl:mb-6">
@@ -76,7 +77,7 @@ <h1>{{ 'home.loggedIn.hosting.title' | translate }}</h1>
7677
[buttonLabel]="'home.loggedIn.dashboard.createProject' | translate"
7778
(buttonClick)="createProject()"
7879
/>
79-
<osf-tos-consent-banner [termsLink]="'/terms-of-use'" [privacyLink]="'/privacy-policy'"></osf-tos-consent-banner>
80+
<osf-tos-consent-banner></osf-tos-consent-banner>
8081
<div class="flex items-center justify-center min-h-screen bg-white pt-4">
8182
<div class="text-center max-w-2xl px-6 w-full">
8283
<p class="mb-4">{{ 'home.loggedIn.dashboard.noCreatedProject' | translate }}</p>

src/app/features/home/pages/tos-consent-banner/tos-consent-banner.component.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,21 @@ import { ButtonModule } from 'primeng/button';
44
import { CheckboxModule } from 'primeng/checkbox';
55
import { MessageModule } from 'primeng/message';
66

7-
import { NgIf } from '@angular/common';
87
import { Component, computed, Input } from '@angular/core';
98
import { FormsModule } from '@angular/forms';
109

1110
import { UserSelectors } from '@core/store/user';
1211
import { AcceptTermsOfServiceByUser } from '@osf/core/store/user';
12+
import { TranslateModule } from '@ngx-translate/core';
13+
1314

1415
@Component({
1516
selector: 'osf-tos-consent-banner',
16-
imports: [NgIf, FormsModule, CheckboxModule, ButtonModule, MessageModule],
17+
imports: [FormsModule, CheckboxModule, ButtonModule, MessageModule, TranslateModule],
1718
templateUrl: './tos-consent-banner.component.html',
1819
styleUrls: ['./tos-consent-banner.component.scss'],
1920
})
2021
export class TosConsentBannerComponent {
21-
@Input() visible = false;
22-
@Input() termsLink = '/terms';
23-
@Input() privacyLink = '/privacy';
2422

2523
@Input() acceptedTermsOfService = false;
2624

@@ -34,7 +32,7 @@ export class TosConsentBannerComponent {
3432

3533
onContinue() {
3634
if (!this.acceptedTermsOfService) {
37-
this.errorMessage = 'You must agree before continuing.';
35+
this.errorMessage = 'We were unable to save your consent.';
3836
return;
3937
}
4038

0 commit comments

Comments
 (0)