Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32768839
data-loaded-reducer.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1021 B
Referenced Files
None
Subscribers
None
data-loaded-reducer.js
View Options
// @flow
import
{
siweAuthActionTypes
}
from
'../actions/siwe-actions.js'
;
import
{
logOutActionTypes
,
deleteAccountActionTypes
,
logInActionTypes
,
registerActionTypes
,
}
from
'../actions/user-actions.js'
;
import
type
{
BaseAction
}
from
'../types/redux-types.js'
;
import
{
setNewSessionActionType
}
from
'../utils/action-utils.js'
;
export
default
function
reduceDataLoaded
(
state
:
boolean
,
action
:
BaseAction
,
)
:
boolean
{
if
(
action
.
type
===
logInActionTypes
.
success
||
action
.
type
===
siweAuthActionTypes
.
success
||
action
.
type
===
registerActionTypes
.
success
)
{
return
true
;
}
else
if
(
action
.
type
===
setNewSessionActionType
&&
action
.
payload
.
sessionChange
.
currentUserInfo
&&
action
.
payload
.
sessionChange
.
currentUserInfo
.
anonymous
)
{
return
false
;
}
else
if
(
action
.
type
===
logOutActionTypes
.
started
||
action
.
type
===
logOutActionTypes
.
success
||
action
.
type
===
deleteAccountActionTypes
.
success
)
{
return
false
;
}
return
state
;
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Fri, Jan 9, 12:49 PM (20 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5905031
Default Alt Text
data-loaded-reducer.js (1021 B)
Attached To
Mode
rCOMM Comm
Attached
Detach File
Event Timeline
Log In to Comment