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
a6316234
Commit
a6316234
authored
Oct 11, 2021
by
Pramodh Rajapakse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auction screens created
parent
7f04fc28
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
203 additions
and
40 deletions
+203
-40
Navigations/AuctionBottomTab.js
Navigations/AuctionBottomTab.js
+3
-14
Navigations/AuthStack.js
Navigations/AuthStack.js
+34
-25
screen/Auctions.List.Screen.js
screen/Auctions.List.Screen.js
+55
-0
screen/HomeScreen.js
screen/HomeScreen.js
+1
-1
screen/User.Auctions.Screen.js
screen/User.Auctions.Screen.js
+55
-0
screen/User.Bids.Screen.js
screen/User.Bids.Screen.js
+55
-0
No files found.
Navigations/AuctionBottomTab.js
View file @
a6316234
...
...
@@ -14,37 +14,26 @@ export function AuctionBottomTab() {
return
(
<
View
style
=
{
styles
.
bottomBtn
}
>
<
TouchableOpacity
style
=
{
styles
.
barButtonView
}
onPress
=
{()
=>
navigation
.
navigate
(
"
gamificatio
n
"
)}
onPress
=
{()
=>
navigation
.
navigate
(
"
AuctionListScree
n
"
)}
>
<
Ionicons
name
=
"
cart
"
size
=
{
24
}
color
=
{
themeColors
.
PRIMARY_COLOR
}
/
>
<
Text
style
=
{
styles
.
iconText
}
>
Buy
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
barButtonView
}
onPress
=
{()
=>
navigation
.
navigate
(
"
gamification
"
)}
>
<
Ionicons
name
=
"
pricetag
"
size
=
{
24
}
color
=
{
themeColors
.
PRIMARY_COLOR
}
/
>
<
Text
style
=
{
styles
.
iconText
}
>
Sell
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
barButtonView
}
onPress
=
{()
=>
navigation
.
navigate
(
"
Leaderboard
"
)}
onPress
=
{()
=>
navigation
.
navigate
(
"
UserBidScreen
"
)}
>
<
MaterialIcons
name
=
"
leaderboard
"
size
=
{
24
}
color
=
{
themeColors
.
PRIMARY_COLOR
}
/
>
<
Text
style
=
{
styles
.
iconText
}
>
Bids
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
barButtonView
}
onPress
=
{()
=>
navigation
.
navigate
(
"
gamificatio
n
"
)}
onPress
=
{()
=>
navigation
.
navigate
(
"
UserAuctionScree
n
"
)}
>
<
MaterialIcons
name
=
"
gavel
"
size
=
{
24
}
color
=
{
themeColors
.
PRIMARY_COLOR
}
/
>
<
Text
style
=
{
styles
.
iconText
}
>
Auctions
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
barButtonView
}
onPress
=
{()
=>
navigation
.
navigate
(
"
AuctionHomeScreen
"
)}
>
...
...
Navigations/AuthStack.js
View file @
a6316234
import
React
from
"
react
"
;
import
{
createStackNavigator
}
from
"
@react-navigation/stack
"
;
import
{
Ionicons
}
from
"
@expo/vector-icons
"
;
import
{
MaterialIcons
}
from
'
@expo/vector-icons
'
;
import
{
Ionicons
,
MaterialIcons
}
from
"
@expo/vector-icons
"
;
import
{
SignIn
}
from
"
../screen/SignIn
"
;
import
{
SignUp
}
from
"
../screen/SignUp
"
;
import
{
HomeScreen
}
from
"
../screen/HomeScreen
"
;
...
...
@@ -12,6 +11,9 @@ import { IotScreen } from "../screen/IotScreen";
import
{
AboutUs
}
from
"
../screen/AboutUs
"
;
import
axios
from
"
axios
"
;
import
HomeAuctionScreen
from
"
../screen/Home.Auction.Screen
"
;
import
UserAuctionListScreen
from
"
../screen/User.Auctions.Screen
"
;
import
UserBidScreen
from
"
../screen/User.Bids.Screen
"
;
import
AuctionListScreen
from
"
../screen/Auctions.List.Screen
"
;
const
Stack
=
createStackNavigator
();
...
...
@@ -189,31 +191,38 @@ export function AuthStack({ navigation }) {
}}
/
>
<
Stack
.
Screen
name
=
"
auctions
creen
"
name
=
"
AuctionHomeS
creen
"
component
=
{
HomeAuctionScreen
}
options
=
{{
title
:
"
Auction Screen
"
,
headerTitleAlign
:
"
center
"
,
headerRight
:
()
=>
{
return
(
<
MaterialIcons
name
=
"
logout
"
size
=
{
30
}
color
=
"
black
"
onPress
=
{()
=>
axios
.
get
(
"
http://192.168.8.126:5000/logout
"
,
)
.
then
(
function
(
response
)
{
const
stngobj
=
JSON
.
stringify
(
response
.
data
)
console
.
log
(
stngobj
+
"
logged out
"
);
console
.
log
(
"
Successfully logged out
"
);
alert
(
"
Successfully Logged out
"
)
navigation
.
navigate
(
"
SignIn
"
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
alert
(
"
Login failed
"
)
})}
title
:
"
Auctions
"
,
headerTitleAlign
:
"
center
"
}}
/
>
);
},
<
Stack
.
Screen
name
=
"
UserAuctionScreen
"
component
=
{
UserAuctionListScreen
}
options
=
{{
headerShown
:
false
,
title
:
"
My Auctions
"
,
headerTitleAlign
:
"
center
"
}}
/
>
<
Stack
.
Screen
name
=
"
UserBidScreen
"
component
=
{
UserBidScreen
}
options
=
{{
headerShown
:
false
,
title
:
"
My Bids
"
,
headerTitleAlign
:
"
center
"
}}
/
>
<
Stack
.
Screen
name
=
"
AuctionListScreen
"
component
=
{
AuctionListScreen
}
options
=
{{
headerShown
:
false
,
title
:
"
Auctions List
"
,
headerTitleAlign
:
"
center
"
}}
/
>
<
Stack
.
Screen
...
...
screen/Auctions.List.Screen.js
0 → 100644
View file @
a6316234
// Example of Splash, Login and Sign Up in React Native
// https://aboutreact.com/react-native-login-and-signup/
// Import React and Component
import
React
from
'
react
'
;
import
{
View
,
StyleSheet
,
Text
,
ScrollView
}
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
AuctionListScreen
=
({
navigation
})
=>
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
AppContainer
>
<
Text
style
=
{
styles
.
auctionHeading
}
>
Auctions
List
<
/Text
>
<
ScrollView
>
<
View
>
<
AppAuctionItem
label
=
'
Auction Item 1
'
onPress
=
{()
=>
navigation
.
navigate
(
"
SignUp
"
)}
/
>
<
AppAuctionItem
label
=
'
Auction Item 2
'
/>
<
AppAuctionItem
label
=
'
Auction Item 3
'
/>
<
AppAuctionItem
label
=
'
Auction Item 4
'
/>
<
/View
>
<
/ScrollView
>
<
/AppContainer
>
<
AuctionBottomTab
/>
<
/View
>
);
};
export
default
AuctionListScreen
;
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
backgroundColor
:
'
#ffffff
'
},
header
:
{
height
:
'
35%
'
,
marginBottom
:
25
,
backgroundColor
:
themeColors
.
PRIMARY_COLOR
},
btnRowContainer
:
{
maxHeight
:
100
},
contentContainer
:
{
flex
:
1
,
flexDirection
:
'
row
'
,
margin
:
20
},
auctionHeading
:
{
fontSize
:
24
,
fontWeight
:
'
bold
'
,
color
:
themeColors
.
SECONDARY_COLOR
}
})
\ No newline at end of file
screen/HomeScreen.js
View file @
a6316234
...
...
@@ -61,7 +61,7 @@ export function HomeScreen({ navigation }) {
<
View
>
<
TouchableOpacity
style
=
{
styles
.
Auction
}
onPress
=
{()
=>
navigation
.
navigate
(
"
auctions
creen
"
)}
onPress
=
{()
=>
navigation
.
navigate
(
"
AuctionHomeS
creen
"
)}
>
<
Ionicons
name
=
"
game-controller
"
size
=
{
24
}
color
=
"
black
"
/>
<
Text
style
=
{
styles
.
buttonText
}
>
Auction
<
/Text
>
...
...
screen/User.Auctions.Screen.js
0 → 100644
View file @
a6316234
// Example of Splash, Login and Sign Up in React Native
// https://aboutreact.com/react-native-login-and-signup/
// Import React and Component
import
React
from
'
react
'
;
import
{
View
,
StyleSheet
,
Text
,
ScrollView
}
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
UserAuctionListScreen
=
({
navigation
})
=>
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
AppContainer
>
<
Text
style
=
{
styles
.
auctionHeading
}
>
Auctions
List
<
/Text
>
<
ScrollView
>
<
View
>
<
AppAuctionItem
label
=
'
Auction Item 1
'
onPress
=
{()
=>
navigation
.
navigate
(
"
SignUp
"
)}
/
>
<
AppAuctionItem
label
=
'
Auction Item 2
'
/>
<
AppAuctionItem
label
=
'
Auction Item 3
'
/>
<
AppAuctionItem
label
=
'
Auction Item 4
'
/>
<
/View
>
<
/ScrollView
>
<
/AppContainer
>
<
AuctionBottomTab
/>
<
/View
>
);
};
export
default
UserAuctionListScreen
;
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
backgroundColor
:
'
#ffffff
'
},
header
:
{
height
:
'
35%
'
,
marginBottom
:
25
,
backgroundColor
:
themeColors
.
PRIMARY_COLOR
},
btnRowContainer
:
{
maxHeight
:
100
},
contentContainer
:
{
flex
:
1
,
flexDirection
:
'
row
'
,
margin
:
20
},
auctionHeading
:
{
fontSize
:
24
,
fontWeight
:
'
bold
'
,
color
:
themeColors
.
SECONDARY_COLOR
}
})
\ No newline at end of file
screen/User.Bids.Screen.js
0 → 100644
View file @
a6316234
// Example of Splash, Login and Sign Up in React Native
// https://aboutreact.com/react-native-login-and-signup/
// Import React and Component
import
React
from
'
react
'
;
import
{
View
,
StyleSheet
,
Text
,
ScrollView
}
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
UserBidScreen
=
({
navigation
})
=>
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
AppContainer
>
<
Text
style
=
{
styles
.
auctionHeading
}
>
Auctions
List
<
/Text
>
<
ScrollView
>
<
View
>
<
AppAuctionItem
label
=
'
Auction Item 1
'
onPress
=
{()
=>
navigation
.
navigate
(
"
SignUp
"
)}
/
>
<
AppAuctionItem
label
=
'
Auction Item 2
'
/>
<
AppAuctionItem
label
=
'
Auction Item 3
'
/>
<
AppAuctionItem
label
=
'
Auction Item 4
'
/>
<
/View
>
<
/ScrollView
>
<
/AppContainer
>
<
AuctionBottomTab
/>
<
/View
>
);
};
export
default
UserBidScreen
;
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
backgroundColor
:
'
#ffffff
'
},
header
:
{
height
:
'
35%
'
,
marginBottom
:
25
,
backgroundColor
:
themeColors
.
PRIMARY_COLOR
},
btnRowContainer
:
{
maxHeight
:
100
},
contentContainer
:
{
flex
:
1
,
flexDirection
:
'
row
'
,
margin
:
20
},
auctionHeading
:
{
fontSize
:
24
,
fontWeight
:
'
bold
'
,
color
:
themeColors
.
SECONDARY_COLOR
}
})
\ No newline at end of file
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