FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
react-native-example/utils.js at master · GetStream/react-native-example · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
GetStream
/
react-native-example
Public
Notifications
You must be signed in to change notification settings
Fork
194
Star
340
Code
Issues
9
Pull requests
16
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
react-native-example
/
utils.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
21 lines (20 loc) · 436 Bytes
Breadcrumbs
react-native-example
/
utils.js
Copy path
File metadata and controls
21 lines (20 loc) · 436 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
export
function
goToProfile
(
id
)
{
// TODO: implement
console
.
log
(
"user id: "
,
id
)
;
}
export
function
userOrDefault
(
user
)
{
let
actor
;
const
notFound
=
{
id
:
"!not-found"
,
created_at
:
""
,
updated_at
:
""
,
data
:
{
name
:
"Unknown"
,
profileImage
:
""
}
}
;
if
(
typeof
user
===
"string"
||
typeof
user
.
error
===
"string"
)
{
actor
=
notFound
;
}
else
{
//$FlowBug
actor
=
(
user
)
;
}
return
actor
;
}
Back
|
FazBrowse Home
|
New Git URL