Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
PPL Sosial
tbcare
tbcare-mobile
Commits
7687186b
Commit
7687186b
authored
Jun 06, 2021
by
jahnsmichael
Browse files
[GREEN] ProfilePage scenes
parent
24bc1808
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scenes/ProfilePage/index.tsx
View file @
7687186b
import
{
Box
,
Text
,
Header
,
Gap
}
from
"
components
"
;
import
{
Text
,
Header
,
Gap
,
Button
}
from
"
components
"
;
import
{
AppContext
}
from
'
contexts
'
;
import
{
AppContext
}
from
'
contexts
'
;
import
styled
from
'
styled-components/native
'
;
import
styled
from
'
styled-components/native
'
;
import
{
useNavigation
}
from
'
@react-navigation/native
'
;
import
React
,
{
useContext
}
from
"
react
"
;
import
React
,
{
useContext
}
from
"
react
"
;
const
ProfilePage
=
()
=>
{
const
ProfilePage
=
()
=>
{
const
global
=
useContext
(
AppContext
);
const
global
=
useContext
(
AppContext
);
const
navigation
=
useNavigation
();
return
(
return
(
<>
<>
<
Header
<
Header
isHome
=
{
false
}
isHome
=
{
false
}
headerText
=
{
`Profile
${
global
.
user
.
name
.
split
(
"
"
)[
0
]}
`
}
/>
headerText
=
{
`Profile
${
global
.
user
.
name
.
split
(
"
"
)[
0
]}
`
}
/>
<
Container
>
<
Container
>
<
Button
width
=
"50%"
type
=
{
Button
.
Type
.
Outline
}
onPress
=
{
()
=>
global
.
isAuthenticated
?
navigation
.
navigate
(
"
edit-profile
"
)
:
navigation
.
navigate
(
"
login
"
)
}
>
Edit Profile
</
Button
>
<
Gap
axis
=
{
Gap
.
Axis
.
Vertical
}
gap
=
{
12
}
></
Gap
>
<
Text
type
=
{
Text
.
StyleType
.
Large
}
isBold
=
{
true
}
>
Username
</
Text
>
<
Text
type
=
{
Text
.
StyleType
.
Large
}
isBold
=
{
true
}
>
Username
</
Text
>
<
Text
>
{
global
.
user
.
username
}
</
Text
>
<
Text
>
{
global
.
user
.
username
}
</
Text
>
<
Gap
axis
=
{
Gap
.
Axis
.
Vertical
}
gap
=
{
12
}
></
Gap
>
<
Gap
axis
=
{
Gap
.
Axis
.
Vertical
}
gap
=
{
12
}
></
Gap
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment