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 KI Ganjil 2021 2022
Clicks - Ecosystem Business
clicks-frontend
Commits
931b32d8
Commit
931b32d8
authored
Sep 26, 2021
by
Abraham Rudolf Brahmana
Committed by
Bagus Prabowo
Sep 26, 2021
Browse files
Fix: Change password screen fix
parent
523941ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/screens/SuccessChangePasswordScreen.tsx
View file @
931b32d8
...
...
@@ -10,20 +10,24 @@ import Colors from "../constants/Colors";
import
{
ProfileStackParamList
}
from
"
../types/navigation
"
;
export
default
function
SuccessChangePasswordScreen
()
{
const
nav
=
useNavigation
<
NativeStackNavigationProp
<
ProfileStackParamList
>>
();
const
nav
=
useNavigation
();
return
(
<
View
style
=
{
styles
.
container
}
>
<
Spacer
variant
=
{
"
xl
"
}
/>
<
Text
style
=
{
styles
.
title
}
>
Ganti Password Berhasil
</
Text
>
<
View
>
<
Text
style
=
{
styles
.
title
}
>
Ganti Password Berhasil
</
Text
>
</
View
>
<
Spacer
variant
=
{
"
xl
"
}
/>
<
Text
style
=
{
styles
.
paragraph
}
>
Anda sudah bisa masuk menggunakan password baru anda.
</
Text
>
<
View
>
<
Text
style
=
{
styles
.
paragraph
}
>
Anda sudah bisa masuk menggunakan password baru anda.
</
Text
>
</
View
>
<
Spacer
variant
=
{
"
xl
"
}
/>
<
View
style
=
{
styles
.
buttonContainer
}
>
<
MainButton
text
=
{
"
Kembali
"
}
onPress
=
{
()
=>
nav
.
goBack
(
)
}
onPress
=
{
()
=>
nav
.
navigate
(
"
AccountSettings
"
)
}
colors
=
{
"
Secondary
"
}
/>
</
View
>
...
...
src/screens/profile/ChangePasswordScreen.tsx
View file @
931b32d8
...
...
@@ -6,9 +6,15 @@ import MainButton from "../../components/button/MainButton";
import
IconForm
from
"
../../components/Forms/IconForm
"
;
import
Spacer
from
"
../../components/Spacer/Spacer
"
;
import
Colors
from
"
../../constants/Colors
"
;
import
{
RootTabScreenProps
}
from
"
../../types/navigation
"
;
import
{
useDispatch
}
from
"
react-redux
"
;
import
{
changePassword
}
from
"
../../redux/user/actions
"
;
const
ChangePasswordScreen
=
()
=>
{
const
ChangePasswordScreen
=
({
navigation
,
}:
RootTabScreenProps
<
"
Profile
"
>
)
=>
{
const
nav
=
useNavigation
();
const
dispatch
=
useDispatch
();
const
[
oldPassword
,
onChangeOldPassword
]
=
useState
(
""
);
const
[
newPassword
,
onChangeNewPassword
]
=
useState
(
""
);
...
...
@@ -28,8 +34,12 @@ const ChangePasswordScreen = () => {
</
View
>
<
Spacer
variant
=
{
"
m
"
}
/>
<
View
style
=
{
styles
.
componentWrapper
}
>
<
TouchableOpacity
>
<
Text
style
=
{
styles
.
link
}
>
Lupa password lama anda
</
Text
>
<
TouchableOpacity
onPress
=
{
()
=>
{
nav
.
navigate
(
"
Auth
"
,
{
screen
:
"
InputForgotPassword
"
});
}
}
>
<
Text
style
=
{
styles
.
link
}
>
Lupa password lama anda?
</
Text
>
</
TouchableOpacity
>
</
View
>
<
Spacer
variant
=
{
"
l
"
}
/>
...
...
@@ -49,6 +59,9 @@ const ChangePasswordScreen = () => {
text
=
{
"
Ganti Password
"
}
onPress
=
{
()
=>
{
Keyboard
.
dismiss
();
dispatch
(
changePassword
(
oldPassword
,
newPassword
));
onChangeOldPassword
(
""
);
onChangeNewPassword
(
""
);
nav
.
navigate
(
"
SuccessChangePassword
"
);
}
}
colors
=
{
"
Secondary
"
}
...
...
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