mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-10 19:52:53 +00:00
@@ -23,7 +23,7 @@ import {ConfigProvider} from '../../config/config.provider';
|
||||
styleUrls: ['about-page.scss'],
|
||||
})
|
||||
export class AboutPageComponent implements OnInit {
|
||||
content: Promise<SCAboutPage>;
|
||||
content: SCAboutPage;
|
||||
|
||||
constructor(
|
||||
private readonly route: ActivatedRoute,
|
||||
@@ -33,12 +33,11 @@ export class AboutPageComponent implements OnInit {
|
||||
async ngOnInit() {
|
||||
const route = this.route.snapshot.url.map(it => it.path).join('/');
|
||||
|
||||
this.content = new Promise(resolve => {
|
||||
this.configProvider
|
||||
.getValue('aboutPages')
|
||||
.then(value =>
|
||||
resolve((value as SCAppConfiguration['aboutPages'])[route] ?? {}),
|
||||
);
|
||||
});
|
||||
this.content =
|
||||
(
|
||||
this.configProvider.getValue(
|
||||
'aboutPages',
|
||||
) as SCAppConfiguration['aboutPages']
|
||||
)[route] ?? {};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user