1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Solved cycle dependency

This commit is contained in:
Zhiyuan Zheng
2021-01-01 17:52:14 +01:00
parent 6aed76ac65
commit d5ccc95704
19 changed files with 60 additions and 74 deletions

View File

@ -1,6 +1,5 @@
import axios from 'axios'
import chalk from 'chalk'
import { store, RootState } from '@root/store'
const ctx = new chalk.Instance({ level: 3 })
@ -36,7 +35,8 @@ const client = async ({
(params ? ctx.green(' -> ') : ''),
params ? params : ''
)
const state: RootState['instances'] = store.getState().instances
const { store } = require('@root/store')
const state = store.getState().instances
const domain =
instance === 'remote' ? instanceDomain || state.remote.url : state.local.url