Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-090 frontend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2021-090
2021-090 frontend
Commits
1900eeee
Commit
1900eeee
authored
Nov 24, 2021
by
pramod.nichelabs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
props passed for auction list and stakes
parent
09ade011
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
14 deletions
+32
-14
components/auction.stake.component.js
components/auction.stake.component.js
+9
-4
screen/Auction.Detail.Screen.js
screen/Auction.Detail.Screen.js
+19
-9
screen/Home.Auction.Screen.js
screen/Home.Auction.Screen.js
+4
-1
No files found.
components/auction.stake.component.js
View file @
1900eeee
import
React
from
'
react
'
;
import
React
,
{
useEffect
,
useState
}
from
'
react
'
;
import
{
StyleSheet
,
View
,
Text
}
from
'
react-native
'
;
import
themeColors
from
'
../assets/colors
'
;
export
const
AppStakeItem
=
(
props
)
=>
{
const
[
bid
,
setBid
]
=
useState
({});
useEffect
(()
=>
{
setBid
(
props
.
bid
)
},
[])
return
(
<
View
style
=
{
styles
.
stake
}
>
<
View
style
=
{
styles
.
stakeWrapperEdges
}
/
>
...
...
@@ -17,12 +22,12 @@ export const AppStakeItem = (props) => {
<
View
style
=
{
styles
.
stakeDetailsContent
}
>
<
View
>
<
View
style
=
{
styles
.
lotTile
}
>
<
Text
style
=
{
styles
.
lotText
}
>
62
<
/Text
>
<
Text
style
=
{
styles
.
lotText
}
>
{
bid
.
id
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
lotDetails
}
>
<
Text
style
=
{
styles
.
lotName
}
>
William
Grey
<
/Text
>
<
Text
style
=
{
styles
.
label
}
>
Rs
.
164.00
<
/Text
>
<
Text
style
=
{
styles
.
lotName
}
>
{
bid
.
name
}
<
/Text
>
<
Text
style
=
{
styles
.
label
}
>
Rs
.
{
bid
.
bidprice
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
stakeSideEdges
}
>
...
...
screen/Auction.Detail.Screen.js
View file @
1900eeee
import
React
from
'
react
'
;
import
React
,
{
useEffect
,
useState
}
from
'
react
'
;
import
{
View
,
StyleSheet
,
Text
,
ScrollView
}
from
'
react-native
'
;
import
{
AppStakeItem
}
from
'
../components/auction.stake.component
'
;
import
{
AppContainer
}
from
'
../container/container
'
;
...
...
@@ -7,7 +7,16 @@ import { AuctionBottomTab } from '../Navigations/AuctionBottomTab';
import
AppCarousel
from
'
../components/carousel.component
'
;
import
{
AppAddBid
}
from
'
../components/add_bid_button.component
'
;
const
AuctionDetailScreen
=
(
props
,
{
navigation
})
=>
{
const
AuctionDetailScreen
=
({
route
})
=>
{
const
[
auction
,
setAuction
]
=
useState
({
bids
:
[]});
const
[
bids
,
setBids
]
=
useState
([]);
console
.
log
(
route
.
params
.
auctionObject
.
bids
);
useEffect
(()
=>
{
setAuction
(
route
.
params
.
auctionObject
);
},
[])
useEffect
(()
=>
{
setBids
(
auction
.
bids
)
},
[
auction
])
return
(
<
View
style
=
{
styles
.
wrapper
}
>
<
View
style
=
{
styles
.
header
}
>
...
...
@@ -16,19 +25,20 @@ const AuctionDetailScreen = (props, {navigation}) => {
<
View
style
=
{
styles
.
container
}
>
<
AppContainer
>
<
View
style
=
{
styles
.
titleContent
}
>
<
Text
style
=
{
styles
.
auctionHeading
}
>
Auction
Item
<
/Text
>
<
Text
style
=
{
styles
.
auctionHeading
}
>
{
auction
.
name
}
<
/Text
>
<
View
style
=
{
styles
.
lotContainer
}
>
<
Text
style
=
{
styles
.
auctionText
}
>
Lot
No
:
<
/Text
>
<
View
style
=
{
styles
.
lot
}
><
Text
style
=
{
styles
.
lotText
}
>
17839
<
/Text></
View
>
<
Text
style
=
{
styles
.
auctionText
}
>
Owner
:
<
/Text
>
<
View
style
=
{
styles
.
lot
}
><
Text
style
=
{
styles
.
lotText
}
>
{
auction
.
owner
}
<
/Text></
View
>
<
/View
>
<
/View
>
<
Text
style
=
{
styles
.
auctionText
}
>
Last
Stakes
<
/Text
>
<
ScrollView
horizontal
style
=
{{
height
:
100
}}
>
<
View
style
=
{
styles
.
stakesContainer
}
>
<
AppStakeItem
/>
<
AppStakeItem
/>
<
AppStakeItem
/>
<
AppStakeItem
/>
{
bids
.
map
((
bid
)
=>
{
return
(
<
AppStakeItem
bid
=
{
bid
}
/
>
)
})}
<
/View
>
<
/ScrollView
>
<
AppAddBid
/>
...
...
screen/Home.Auction.Screen.js
View file @
1900eeee
...
...
@@ -29,7 +29,10 @@ const HomeAuctionScreen = ({navigation}) => {
<
View
>
{
auctions
.
map
((
auction
)
=>
{
return
(
<
AppAuctionItem
label
=
{
auction
.
name
}
expire
=
{
auction
.
expire_date
}
onPress
=
{()
=>
navigation
.
navigate
(
"
AuctionDetailScreen
"
)}
/
>
<
AppAuctionItem
label
=
{
auction
.
name
}
expire
=
{
auction
.
expire_date
}
onPress
=
{()
=>
navigation
.
navigate
(
"
AuctionDetailScreen
"
,
{
auctionObject
:
auction
})
}
/
>
)
})}
<
/View
>
...
...
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