Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InvestCustomer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Giang Tran
InvestCustomer
Commits
a321cd11
Commit
a321cd11
authored
May 31, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update countdown
parent
7bb18693
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
55 additions
and
2 deletions
+55
-2
index.js
index.js
+0
-1
OTPWallet.js
src/Screens/Action/Wallet/OTPWallet.js
+3
-0
WalletWithdraw.js
src/Screens/Action/Wallet/WalletWithdraw.js
+1
-0
ConfirmOTP.js
src/Screens/Authen/ConfirmOTP.js
+2
-0
RegisterOTP.js
src/Screens/Authen/RegisterOTP.js
+2
-0
CountDown.js
src/components/CountDown.js
+44
-0
HeaderHome.js
src/components/Header/HeaderHome.js
+1
-1
en.js
src/helper/i18/locales/en.js
+1
-0
vn.js
src/helper/i18/locales/vn.js
+1
-0
No files found.
index.js
View file @
a321cd11
...
@@ -6,5 +6,4 @@ import {AppRegistry} from 'react-native';
...
@@ -6,5 +6,4 @@ import {AppRegistry} from 'react-native';
import
App
from
'./App'
;
import
App
from
'./App'
;
import
{
name
as
appName
}
from
'./app.json'
;
import
{
name
as
appName
}
from
'./app.json'
;
AppRegistry
.
registerComponent
(
appName
,
()
=>
App
);
AppRegistry
.
registerComponent
(
appName
,
()
=>
App
);
src/Screens/Action/Wallet/OTPWallet.js
View file @
a321cd11
...
@@ -27,6 +27,7 @@ import {showLoading, hideLoading} from '../../../actions/loadingAction';
...
@@ -27,6 +27,7 @@ import {showLoading, hideLoading} from '../../../actions/loadingAction';
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
TABNAVIGATOR
}
from
'../../../routers/ScreenNames'
;
import
{
TABNAVIGATOR
}
from
'../../../routers/ScreenNames'
;
import
{
showAlert
,
TYPE
}
from
'../../../components/DropdownAlert'
;
import
{
showAlert
,
TYPE
}
from
'../../../components/DropdownAlert'
;
import
CountDown
from
'../../../components/CountDown'
;
const
CELL_COUNT
=
4
;
const
CELL_COUNT
=
4
;
...
@@ -145,8 +146,10 @@ const ConfirmOTP = (propsa) => {
...
@@ -145,8 +146,10 @@ const ConfirmOTP = (propsa) => {
style
=
{
styles
.
wrapFooter
}
style
=
{
styles
.
wrapFooter
}
onPress
=
{()
=>
navigate
.
goBack
()}
>
onPress
=
{()
=>
navigate
.
goBack
()}
>
<
Text
style
=
{
styles
.
txtNote
}
>
{
I18n
.
t
(
'OTPValidFiveMinute'
)}
<
/Text
>
<
Text
style
=
{
styles
.
txtNote
}
>
{
I18n
.
t
(
'OTPValidFiveMinute'
)}
<
/Text
>
<
AppText
i18nKey
=
{
'Re_send'
}
style
=
{
styles
.
txtSend
}
/
>
<
AppText
i18nKey
=
{
'Re_send'
}
style
=
{
styles
.
txtSend
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
CountDown
/>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
);
);
...
...
src/Screens/Action/Wallet/WalletWithdraw.js
View file @
a321cd11
...
@@ -213,6 +213,7 @@ const WalletWithdraw = (props) => {
...
@@ -213,6 +213,7 @@ const WalletWithdraw = (props) => {
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/ScrollView
>
<
View
<
View
style
=
{{
style
=
{{
paddingVertical
:
10
,
paddingVertical
:
10
,
...
...
src/Screens/Authen/ConfirmOTP.js
View file @
a321cd11
...
@@ -27,6 +27,7 @@ import AppText from '../../components/AppText';
...
@@ -27,6 +27,7 @@ import AppText from '../../components/AppText';
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
CountDown
from
'../../components/CountDown'
;
const
CELL_COUNT
=
4
;
const
CELL_COUNT
=
4
;
...
@@ -111,6 +112,7 @@ const ConfirmOTP = (propsa) => {
...
@@ -111,6 +112,7 @@ const ConfirmOTP = (propsa) => {
<
Text
style
=
{
styles
.
txtNote
}
>
{
I18n
.
t
(
'OTPValidFiveMinute'
)}
<
/Text
>
<
Text
style
=
{
styles
.
txtNote
}
>
{
I18n
.
t
(
'OTPValidFiveMinute'
)}
<
/Text
>
<
AppText
i18nKey
=
{
'Re_send'
}
style
=
{
styles
.
txtSend
}
/
>
<
AppText
i18nKey
=
{
'Re_send'
}
style
=
{
styles
.
txtSend
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
CountDown
/>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
);
);
...
...
src/Screens/Authen/RegisterOTP.js
View file @
a321cd11
...
@@ -27,6 +27,7 @@ import AppText from '../../components/AppText';
...
@@ -27,6 +27,7 @@ import AppText from '../../components/AppText';
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
CountDown
from
'../../components/CountDown'
;
const
CELL_COUNT
=
4
;
const
CELL_COUNT
=
4
;
...
@@ -143,6 +144,7 @@ const ConfirmOTP = (propsa) => {
...
@@ -143,6 +144,7 @@ const ConfirmOTP = (propsa) => {
<
Text
style
=
{
styles
.
txtNote
}
>
{
I18n
.
t
(
'OTPValidFiveMinute'
)}
<
/Text
>
<
Text
style
=
{
styles
.
txtNote
}
>
{
I18n
.
t
(
'OTPValidFiveMinute'
)}
<
/Text
>
<
AppText
i18nKey
=
{
'Re_send'
}
style
=
{
styles
.
txtSend
}
/
>
<
AppText
i18nKey
=
{
'Re_send'
}
style
=
{
styles
.
txtSend
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
CountDown
/>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
);
);
...
...
src/components/CountDown.js
0 → 100644
View file @
a321cd11
import
React
,
{
Component
,
useEffect
,
useState
}
from
'react'
;
import
{
View
,
Text
}
from
'react-native'
;
import
{
showAlert
,
TYPE
}
from
'./DropdownAlert'
;
import
I18n
from
'../helper/i18/i18n'
;
import
{
getFontXD
}
from
'../Config/Functions'
;
const
CountDown
=
(
props
)
=>
{
const
[
count
,
setCount
]
=
useState
(
300
);
useEffect
(()
=>
{
if
(
count
==
0
)
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Overtime'
));
},
[
count
]);
useEffect
(()
=>
{
clearTimeout
();
if
(
count
>
0
)
{
const
timer
=
setTimeout
(()
=>
{
setCount
(
count
-
1
);
},
1000
);
return
()
=>
clearTimeout
(
timer
);
}
});
const
secondToString
=
(
count
)
=>
{
const
temp
=
count
%
60
;
return
temp
<
10
?
`0
${
temp
}
`
:
temp
;
};
return
(
<
View
>
<
Text
style
=
{{
color
:
'#A2A2A2'
,
fontStyle
:
'italic'
,
fontSize
:
getFontXD
(
42
),
}}
>
0
{
parseInt
(
count
/
60
)}:{
secondToString
(
count
)}
<
/Text
>
<
/View
>
);
};
export
default
CountDown
;
src/components/Header/HeaderHome.js
View file @
a321cd11
...
@@ -352,7 +352,7 @@ const styles = StyleSheet.create({
...
@@ -352,7 +352,7 @@ const styles = StyleSheet.create({
width
:
1
,
width
:
1
,
height
:
2
,
height
:
2
,
},
},
shadowOpacity
:
1.2
5
,
shadowOpacity
:
0.5
5
,
shadowRadius
:
1.84
,
shadowRadius
:
1.84
,
elevation
:
3
,
elevation
:
3
,
},
},
...
...
src/helper/i18/locales/en.js
View file @
a321cd11
...
@@ -288,4 +288,5 @@ export default {
...
@@ -288,4 +288,5 @@ export default {
AvailableMargin
:
'Available margin'
,
AvailableMargin
:
'Available margin'
,
WarnMinReqestWithdraw
:
WarnMinReqestWithdraw
:
'The withdrawal amount must be more than 1 million dong'
,
'The withdrawal amount must be more than 1 million dong'
,
Overtime
:
'Overtime OTP'
,
};
};
src/helper/i18/locales/vn.js
View file @
a321cd11
...
@@ -288,4 +288,5 @@ export default {
...
@@ -288,4 +288,5 @@ export default {
_Sell
:
'Bán'
,
_Sell
:
'Bán'
,
FirstEscrow
:
'Ký quỹ ban đầu (VNĐ) '
,
FirstEscrow
:
'Ký quỹ ban đầu (VNĐ) '
,
WarnMinReqestWithdraw
:
'Số tiền rút phải lớn hơn 1 triệu đồng'
,
WarnMinReqestWithdraw
:
'Số tiền rút phải lớn hơn 1 triệu đồng'
,
Overtime
:
'Mã OTP hết hạn sử dụng'
,
};
};
Write
Preview
Markdown
is supported
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