Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commitd7d6401

Browse files
committed
refactor(import): mv network staff to asyncSuit
1 parent8d1100c commitd7d6401

File tree

39 files changed

+230
-378
lines changed

39 files changed

+230
-378
lines changed

‎containers/AccountEditor/logic.js‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
importRfrom'ramda'
22

33
import{
4-
asyncRes,
5-
asyncErr,
4+
asyncSuit,
65
buildLog,
7-
$solver,
86
send,
97
EVENT,
108
ERR,
119
TYPE,
1210
meteorState,
1311
}from'@utils'
14-
importSR71from'utils/network/sr71'
12+
1513
importSfrom'./schema'
1614

15+
const{SR71, $solver, asyncRes, asyncErr}=asyncSuit
1716
constsr71$=newSR71()
1817

1918
/* eslint-disable no-unused-vars */

‎containers/AccountViewer/logic.js‎

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
11
// import R from 'ramda'
2-
import{
3-
asyncRes,
4-
asyncErr,
5-
buildLog,
6-
$solver,
7-
ERR,
8-
send,
9-
EVENT,
10-
TYPE,
11-
Global,
12-
}from'@utils'
13-
14-
importSR71from'utils/network/sr71'
2+
import{asyncSuit,buildLog,ERR,send,EVENT,TYPE,Global}from'@utils'
3+
154
importSfrom'./schema'
165

176
/* eslint-disable no-unused-vars */
187
constlog=buildLog('L:AccountViewer')
198
/* eslint-enable no-unused-vars */
209

10+
const{SR71, $solver, asyncRes, asyncErr}=asyncSuit
2111
constsr71$=newSR71({
2212
recieve:[EVENT.LOGIN],
2313
})

‎containers/ArticleViwer/logic.js‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
importRfrom'ramda'
22

3-
importSR71from'utils/network/sr71'
4-
import{asyncRes,buildLog,EVENT,TYPE}from'@utils'
3+
import{asyncSuit,buildLog,EVENT,TYPE}from'@utils'
54
importSfrom'./schema'
65

7-
constsr71$=newSR71({
8-
recieve:[EVENT.PREVIEW_POST,EVENT.PREVIEW_CLOSED],
9-
})
10-
116
/* eslint-disable no-unused-vars */
127
constlog=buildLog('L:ArticleViwer')
138
/* eslint-enable no-unused-vars */
149

10+
const{SR71, asyncRes}=asyncSuit
11+
constsr71$=newSR71({
12+
recieve:[EVENT.PREVIEW_POST,EVENT.PREVIEW_CLOSED],
13+
})
14+
1515
letstore=null
1616
letsub$=null
1717

‎containers/Banner/logic.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// import R from 'ramda'
22

3-
import{buildLog,$solver}from'@utils'
4-
importSR71from'utils/network/sr71'
5-
6-
constsr71$=newSR71()
7-
letsub$=null
3+
import{asyncSuit,buildLog,$solver}from'@utils'
84

95
/* eslint-disable no-unused-vars */
106
constlog=buildLog('L:Banner')
117
/* eslint-enable no-unused-vars */
128

9+
const{SR71}=asyncSuit
10+
constsr71$=newSR71()
11+
12+
letsub$=null
1313
letstore=null
1414

1515
exportfunctionsomeMethod(){}

‎containers/CategoryEditor/logic.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
importRfrom'ramda'
22

3-
import{asyncRes,TYPE,buildLog,closePreviewer,$solver,cast}from'@utils'
4-
importSR71from'utils/network/sr71'
3+
import{asyncSuit,TYPE,buildLog,closePreviewer,cast}from'@utils'
54
importSfrom'./schema'
65

7-
constsr71$=newSR71()
8-
letsub$=null
9-
106
/* eslint-disable no-unused-vars */
117
constlog=buildLog('L:CategoryEditor')
128
/* eslint-enable no-unused-vars */
139

10+
const{SR71, asyncRes, $solver}=asyncSuit
11+
constsr71$=newSR71()
12+
13+
letsub$=null
1414
letstore=null
1515

1616
exportconstprofileChange=R.curry((thread,e)=>

‎containers/CategorySetter/logic.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
importRfrom'ramda'
22

3-
import{buildLog,$solver,TYPE,asyncRes,closePreviewer}from'@utils'
3+
import{asyncSuit,buildLog,TYPE,closePreviewer}from'@utils'
44
import{PAGE_SIZE}from'@config'
55

6-
importSR71from'utils/network/sr71'
76
importSfrom'./schema'
87

9-
constsr71$=newSR71()
10-
letsub$=null
11-
128
/* eslint-disable no-unused-vars */
139
constlog=buildLog('L:CategorySetter')
1410
/* eslint-enable no-unused-vars */
1511

12+
const{SR71, asyncRes, $solver}=asyncSuit
13+
constsr71$=newSR71()
14+
letsub$=null
15+
1616
letstore=null
1717

1818
constcommonFilter=page=>{

‎containers/Comments/logic.js‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
11
importRfrom'ramda'
22
import{
3-
asyncRes,
4-
asyncErr,
3+
asyncSuit,
54
buildLog,
65
EVENT,
76
ERR,
87
TYPE,
9-
$solver,
108
scrollIntoEle,
119
countWords,
1210
send,
1311
extractMentions,
1412
}from'@utils'
1513

1614
import{PAGE_SIZE}from'@config'
17-
importSR71from'utils/network/sr71'
1815
importSfrom'./schema'
1916

20-
constsr71$=newSR71()
21-
letsub$=null
22-
2317
/* eslint-disable no-unused-vars */
2418
constlog=buildLog('L:Comments')
2519
/* eslint-enable no-unused-vars */
2620

21+
const{SR71, asyncRes, asyncErr, $solver}=asyncSuit
22+
constsr71$=newSR71()
23+
24+
letsub$=null
2725
letstore=null
2826

2927
/* DESC_INSERTED, ASC_INSERTED */

‎containers/CommunitiesBanner/logic.js‎

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
11
// import R from 'ramda'
22
// import Router from 'next/router'
3-
import{
4-
asyncRes,
5-
asyncErr,
6-
buildLog,
7-
$solver,
8-
ERR,
9-
EVENT,
10-
TYPE,
11-
send,
12-
}from'@utils'
13-
14-
importSR71from'utils/network/sr71'
3+
import{asyncSuit,buildLog,ERR,EVENT,TYPE,send}from'@utils'
154

165
importSfrom'./schema'
176

18-
constsr71$=newSR71({
19-
recieve:[EVENT.PREVIEW_CLOSE],
20-
})
217
/* eslint-disable no-unused-vars */
228
constlog=buildLog('L:communitiesBanner')
239
/* eslint-enable no-unused-vars */
2410

11+
const{SR71, asyncRes, asyncErr, $solver}=asyncSuit
12+
constsr71$=newSR71({
13+
recieve:[EVENT.PREVIEW_CLOSE],
14+
})
15+
2516
letstore=null
2617
letsub$=null
2718

‎containers/CommunitiesContent/logic.js‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ import { message } from 'antd'
55
import{PAGE_SIZE}from'@config'
66

77
import{
8-
asyncRes,
9-
asyncErr,
10-
$solver,
8+
asyncSuit,
119
ERR,
1210
buildLog,
1311
EVENT,
@@ -19,9 +17,13 @@ import {
1917
send,
2018
}from'@utils'
2119

22-
importSR71from'utils/network/sr71'
2320
importSfrom'./schema'
2421

22+
/* eslint-disable no-unused-vars */
23+
constlog=buildLog('L:CommunitiesContent')
24+
/* eslint-enable no-unused-vars */
25+
26+
const{SR71, asyncRes, asyncErr, $solver}=asyncSuit
2527
constsr71$=newSR71({
2628
recieve:[
2729
EVENT.LOGOUT,
@@ -31,10 +33,6 @@ const sr71$ = new SR71({
3133
],
3234
})
3335

34-
/* eslint-disable no-unused-vars */
35-
constlog=buildLog('L:CommunitiesContent')
36-
/* eslint-enable no-unused-vars */
37-
3836
letsub$=null
3937
letstore=null
4038

‎containers/CommunityBanner/logic.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// import R from 'ramda'
22

3-
import{buildLog,asyncRes,$solver}from'@utils'
4-
importSR71from'utils/network/sr71'
3+
import{asyncSuit,buildLog,$solver}from'@utils'
54

65
importSfrom'./schema'
76

8-
constsr71$=newSR71()
9-
letsub$=null
10-
117
/* eslint-disable no-unused-vars */
128
constlog=buildLog('L:CommunityBanner')
139
/* eslint-enable no-unused-vars */
1410

11+
const{SR71, asyncRes}=asyncSuit
12+
constsr71$=newSR71()
13+
14+
letsub$=null
1515
letstore=null
1616

1717
exportfunctionloadPosts(){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp