initial commit

This commit is contained in:
2022-11-11 17:03:31 +07:00
commit 065551deb3
85 changed files with 16767 additions and 0 deletions

12
store/lockey.js Normal file
View File

@@ -0,0 +1,12 @@
import {http} from "../utils/http";
import {botsRepository} from "../repository/bots";
export class LockeyStore {
constructor(context) {
this.context = context
}
createOrder(body) {
return http.post(botsRepository.url.createOrder(), body);
}
}

15
store/sample.js Normal file
View File

@@ -0,0 +1,15 @@
import {makeAutoObservable} from "mobx";
export class SampleStore {
testObs = 0;
ctx;
constructor(ctx) {
makeAutoObservable(this);
this.ctx = ctx;
}
setTestObs(testObs) {
this.testObs = testObs;
}
}

21
store/store.js Normal file
View File

@@ -0,0 +1,21 @@
import { action, observable, computed, runInAction, makeObservable } from 'mobx'
import { enableStaticRendering } from 'mobx-react-lite';
import { useMemo } from 'react'
import {Sample, SampleStore} from "./sample";
import {LockeyStore} from "./lockey";
// eslint-disable-next-line react-hooks/rules-of-hooks
enableStaticRendering(typeof window === 'undefined')
let store;
export class Store {
sample = new SampleStore(this);
lockey = new LockeyStore(this);
constructor() {
}
hydrate = (data) => {
if (!data) return;
}
}