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
0c41d522
Commit
0c41d522
authored
Oct 14, 2021
by
A.G.J.L.P RAJAPAKSE - IT17023610
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
data populated into auction page
parent
45a523fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
7 deletions
+27
-7
screen/Home.Auction.Screen.js
screen/Home.Auction.Screen.js
+27
-7
No files found.
screen/Home.Auction.Screen.js
View file @
0c41d522
import
React
from
'
react
'
;
import
{
View
,
StyleSheet
,
Text
,
ScrollView
}
from
'
react-native
'
;
import
React
,
{
useEffect
,
useState
}
from
'
react
'
;
import
axios
from
'
axios
'
;
import
{
View
,
StyleSheet
,
Text
,
ScrollView
,
Image
}
from
'
react-native
'
;
import
{
AppAuctionItem
}
from
'
../components/auction_item.component
'
;
import
{
AppContainer
}
from
'
../container/container
'
;
import
themeColors
from
'
../assets/colors
'
;
import
{
AuctionBottomTab
}
from
'
../Navigations/AuctionBottomTab
'
;
const
HomeAuctionScreen
=
({
navigation
})
=>
{
const
[
auctions
,
setAuctions
]
=
useState
([]);
useEffect
(()
=>
{
axios
.
get
(
"
http://localhost:5000/auctions
"
)
.
then
(
async
function
(
response
)
{
setAuctions
(
response
.
data
);
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
})
},
[])
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
header
}
/
>
<
View
style
=
{
styles
.
header
}
>
<
Image
source
=
{
require
(
'
../assets/splash1.png
'
)}
style
=
{
styles
.
images
}
><
/Image
>
<
/View
>
<
AppContainer
>
<
Text
style
=
{
styles
.
auctionHeading
}
>
Auctions
List
<
/Text
>
<
ScrollView
>
<
View
>
<
AppAuctionItem
label
=
'
Auction Item 1
'
onPress
=
{()
=>
navigation
.
navigate
(
"
AuctionDetailScreen
"
)}
/
>
<
AppAuctionItem
label
=
'
Auction Item 2
'
/>
<
AppAuctionItem
label
=
'
Auction Item 3
'
/>
<
AppAuctionItem
label
=
'
Auction Item 4
'
/>
{
auctions
.
map
((
auction
)
=>
{
return
(
<
AppAuctionItem
label
=
{
auction
.
name
}
onPress
=
{()
=>
navigation
.
navigate
(
"
AuctionDetailScreen
"
)}
/
>
)
})}
<
/View
>
<
/ScrollView
>
<
/AppContainer
>
...
...
@@ -39,6 +54,11 @@ const styles = StyleSheet.create({
btnRowContainer
:
{
maxHeight
:
100
},
images
:
{
flex
:
1
,
width
:
400
,
resizeMode
:
'
cover
'
,
},
contentContainer
:
{
flex
:
1
,
flexDirection
:
'
row
'
,
...
...
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