Добавил состояние приложения(профиль) Сделал проверку на активность карты, на то, хватает ли баланса для совершения заказа, доработал обработку ошибок, пофиксил некоторые баги
23 lines
694 B
TypeScript
23 lines
694 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { Store } from '@ngrx/store';
|
|
import { PrimeNGConfig } from 'primeng/api';
|
|
import * as ConfigActions from './state/config/config.actions';
|
|
import * as ProfileActions from './state/profile/profile.actions';
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
templateUrl: './app.component.html',
|
|
styleUrls: ['./app.component.scss'],
|
|
})
|
|
export class AppComponent implements OnInit {
|
|
title = 'Sakura';
|
|
|
|
constructor(private primengConfig: PrimeNGConfig, private store: Store) {}
|
|
|
|
ngOnInit() {
|
|
this.primengConfig.ripple = false;
|
|
this.store.dispatch(ConfigActions.getConfig());
|
|
this.store.dispatch(ProfileActions.getProfile());
|
|
}
|
|
}
|