Skip to content

Commit

Permalink
Fix about component
Browse files Browse the repository at this point in the history
  • Loading branch information
newmanw committed Sep 7, 2024
1 parent 9139d2f commit d515932
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion web-app/src/app/about/about.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<div>
<div class="mat-h1">System</div>
<div>Server Version {{mageVersion.major}}.{{mageVersion.minor}}.{{mageVersion.micro}}</div>
<div>Server Version {{mageVersion?.major}}.{{mageVersion?.minor}}.{{mageVersion?.micro}}</div>
<div>Node Version {{nodeVersion}}</div>
<div>MongoDB Version {{mongoVersion}}</div>
</div>
Expand Down
5 changes: 1 addition & 4 deletions web-app/src/app/about/about.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import { Router } from '@angular/router';
styleUrls: ['./about.component.scss']
})
export class AboutComponent implements OnInit {

name: string
mageVersion: {
major: number,
minor: number,
Expand All @@ -26,7 +24,6 @@ export class AboutComponent implements OnInit {

ngOnInit(): void {
this.apiService.getApi().subscribe(api =>{
this.name = api.name;
this.mageVersion = api.version;
this.apk = api.apk;
this.nodeVersion = api.environment.nodeVersion;
Expand All @@ -35,6 +32,6 @@ export class AboutComponent implements OnInit {
}

onBack(): void {
this.router.navigate(['map']);
this.router.navigate(['home']);
}
}
2 changes: 2 additions & 0 deletions web-app/src/app/about/about.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { RouterModule, Routes } from '@angular/router';
import { AboutComponent } from './about.component';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatIconModule } from '@angular/material/icon';
import { MatButtonModule } from '@angular/material/button';

const routes: Routes = [{
path: '',
Expand All @@ -15,6 +16,7 @@ const routes: Routes = [{
imports: [],
exports: [
CommonModule,
MatButtonModule,
MatIconModule,
MatToolbarModule
]
Expand Down

0 comments on commit d515932

Please sign in to comment.