Skip to content

Commit

Permalink
feat: added back links
Browse files Browse the repository at this point in the history
  • Loading branch information
JanssenBrm committed Jan 27, 2024
1 parent f7fe443 commit bc4f7f9
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/app/premium/premium.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@
</div>
</div>
</div>
<div class="actions">
<span (click)="goBack()">Go back</span>
</div>

</ion-content>
18 changes: 17 additions & 1 deletion src/app/premium/premium.page.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

.roles {
display: flex;
padding: 10vw;
padding: 10vw 10vw 5vw;
}

.role {
Expand Down Expand Up @@ -64,3 +64,19 @@
ion-content {
--ion-background-color: var(--ion-primary-gradient)
}

.actions {
text-align: center;
width: 100%;

span {
color: white !important;
font-variant: all-petite-caps;
font-size:larger;
text-decoration: none;

&:hover {
cursor: pointer;
}
}
}
8 changes: 7 additions & 1 deletion src/app/premium/premium.page.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component } from '@angular/core';
import { Location } from '@angular/common';
import { ROLES } from './config/features.config';
import { FeaturesService } from '../services/features.service';
import { from, Observable } from 'rxjs';
Expand Down Expand Up @@ -27,7 +28,8 @@ export class PremiumPage {
private featureService: FeaturesService,
private toastController: ToastController,
private stripeService: StripeService,
private authService: AuthService
private authService: AuthService,
private location: Location
) {
this.userRole = this.featureService.getUserRole();
}
Expand Down Expand Up @@ -87,4 +89,8 @@ export class PremiumPage {
this.toast = null;
}
}

goBack() {
this.location.back();
}
}
6 changes: 6 additions & 0 deletions src/app/profile/components/menu/menu.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<div class="section">
<div class="items">
<div class="item" button (click)="goBack()">
<ion-icon name="arrow-back-outline" slot="start"></ion-icon>
<ion-label>Back</ion-label>
</div>
</div>
<div class="header">
<ion-label>Information</ion-label>
</div>
Expand Down
4 changes: 4 additions & 0 deletions src/app/profile/components/menu/menu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ export class MenuComponent implements OnInit, AfterViewInit {
this.activePage = tab;
this.tabUpdated.emit(tab);
}

goBack() {
this.location.back();
}
}

0 comments on commit bc4f7f9

Please sign in to comment.