Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
22_23-j 51
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
1
Merge Requests
1
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
22_23-j 51
22_23-j 51
Commits
09e21340
Commit
09e21340
authored
Feb 03, 2023
by
Hasith Yoman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Home page added
parent
08f3bf51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
frontend/Screens/Home.js
frontend/Screens/Home.js
+25
-0
No files found.
frontend/Screens/Home.js
0 → 100644
View file @
09e21340
import
{
StyleSheet
,
Text
,
View
,
StatusBar
}
from
'
react-native
'
import
React
from
'
react
'
import
Admin
from
'
./Admin/Admin
'
import
Stationsingle
from
'
./Station/Stationsingle
'
import
User
from
'
./User/User
'
import
BowserHome
from
'
./Bowser/Bowserhome
'
export
default
function
Home
({
route
,
navigation
})
{
const
{
userid
,
role
}
=
route
.
params
;
console
.
log
(
userid
,
role
);
return
(
<
View
style
=
{{
flex
:
1
,
alignContent
:
'
center
'
}}
>
<
StatusBar
barStyle
=
"
light-content
"
hidden
=
{
false
}
backgroundColor
=
"
#560cce
"
color
=
"
#fff
"
translucent
=
{
true
}
/
>
{
/* We need to specify what component need to render by user's role */
}
{
role
==
'
admin
'
&&
(
<
Admin
userid
=
{
userid
}
role
=
"
admin
"
/>
)
}
{
role
==
'
station
'
&&
(
<
Stationsingle
userid
=
{
userid
}
/>
)
}
{
role
==
'
user
'
&&
(
<
User
userid
=
{
userid
}
/>
)
}
{
role
==
'
bowser
'
&&
(
<
BowserHome
userid
=
{
userid
}
/>
)
}
<
/View
>
)
}
const
styles
=
StyleSheet
.
create
({})
\ 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