24 lines
650 B
JavaScript
24 lines
650 B
JavaScript
import {UI} from "./ui";
|
|
import {Authentication} from "./authentication";
|
|
import {User} from "./user";
|
|
import {Membership} from "./membership";
|
|
import {Product} from "./product";
|
|
import {Categories} from "./categories";
|
|
import {TokenUtil} from "../utils/token";
|
|
|
|
export class Store {
|
|
ui = new UI(this);
|
|
authentication = new Authentication(this);
|
|
user = new User(this);
|
|
membership = new Membership(this);
|
|
product = new Product(this);
|
|
categories = new Categories(this);
|
|
|
|
constructor() {
|
|
TokenUtil.loadToken();
|
|
if (TokenUtil.accessToken) {
|
|
this.authentication.isLoggedIn = true;
|
|
}
|
|
}
|
|
}
|