Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dusken-client
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
EDB
dusken-client
Commits
9863ec99
Commit
9863ec99
authored
May 05, 2019
by
Nikolai R Kristiansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
Add pull to refresh in Proof
parent
be673803
Pipeline
#708
failed with stage
in 1 minute and 43 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
12 deletions
+8
-12
src/modules/membership/MembershipContainer.js
src/modules/membership/MembershipContainer.js
+1
-0
src/modules/membership/Proof.js
src/modules/membership/Proof.js
+5
-4
src/modules/membership/ProofContainer.js
src/modules/membership/ProofContainer.js
+2
-8
No files found.
src/modules/membership/MembershipContainer.js
View file @
9863ec99
...
...
@@ -56,6 +56,7 @@ class MembershipContainer extends Component {
return
(
<
ProofContainer
user
=
{
this
.
props
.
user
}
isFetchingUserData
=
{
this
.
props
.
isFetchingUserData
}
isAuthenticated
=
{
this
.
props
.
isAuthenticated
}
userToken
=
{
this
.
state
.
userToken
}
fetchUser
=
{
this
.
fetchUser
}
...
...
src/modules/membership/Proof.js
View file @
9863ec99
import
React
,
{
useEffect
,
use
State
,
use
Ref
}
from
'
react
'
;
import
{
Image
,
ScrollView
,
StyleSheet
,
Text
,
TouchableOpacity
,
View
}
from
'
react-native
'
;
import
React
,
{
useEffect
,
useRef
}
from
'
react
'
;
import
{
Image
,
ScrollView
,
StyleSheet
,
Text
,
TouchableOpacity
,
View
,
RefreshControl
}
from
'
react-native
'
;
import
{
Button
,
Text
as
NBText
,
Spinner
}
from
'
native-base
'
;
import
Confetti
from
'
react-native-confetti
'
;
...
...
@@ -121,6 +121,8 @@ const MembershipName = ({ user }) => {
const
Proof
=
({
chargeError
,
user
,
fetchUser
,
isFetchingUserData
,
isChargingMembership
,
isLoadingMembershipType
,
membershipPrice
,
...
...
@@ -128,7 +130,6 @@ const Proof = ({
onLogoutPress
,
})
=>
{
const
CONFETTI_TIMEOUT
=
15000
;
const
confettiRef
=
useRef
(
null
);
useEffect
(()
=>
{
...
...
@@ -151,7 +152,7 @@ const Proof = ({
return
(
<
View
>
<
UserConfetti
user
=
{
user
}
confettiRef
=
{
confettiRef
}
/
>
<
ScrollView
>
<
ScrollView
refreshControl
=
{
<
RefreshControl
refreshing
=
{
isFetchingUserData
}
onRefresh
=
{
fetchUser
}
/>}
>
<
View
style
=
{[
styles
.
card
,
{
paddingVertical
:
16
}]}
>
<
MembershipName
user
=
{
user
}
/
>
<
Logo
user
=
{
user
}
/
>
...
...
src/modules/membership/ProofContainer.js
View file @
9863ec99
...
...
@@ -13,13 +13,6 @@ stripe.setOptions({
});
class
ProofContainer
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
refreshing
:
false
,
};
}
getPrice
(
membershipTypes
)
{
if
(
!
membershipTypes
)
{
return
0
;
...
...
@@ -31,8 +24,9 @@ class ProofContainer extends Component {
render
()
{
return
(
<
Proof
{...
this
.
state
}
user
=
{
this
.
props
.
user
}
fetchUser
=
{
this
.
props
.
fetchUser
}
isFetchingUserData
=
{
this
.
props
.
isFetchingUserData
}
isChargingMembership
=
{
this
.
props
.
isChargingMembership
}
isLoadingMembershipType
=
{
this
.
props
.
data
.
loading
}
chargeError
=
{
this
.
props
.
chargeError
?
this
.
props
.
chargeError
:
''
}
...
...
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