Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
21_22-J 38
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
21_22-J 38
21_22-J 38
Commits
4048a704
Commit
4048a704
authored
Jan 06, 2022
by
Lihinikaduwa D.N.R.
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'it18257632' into 'master'
Create Read component See merge request
!62
parents
80546afc
ad8c24a1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
178 additions
and
34 deletions
+178
-34
frontend/src/router/router.js
frontend/src/router/router.js
+55
-22
frontend/src/screen/Read.js
frontend/src/screen/Read.js
+100
-0
frontend/src/screen/home.js
frontend/src/screen/home.js
+23
-12
No files found.
frontend/src/router/router.js
View file @
4048a704
import
React
from
"
react
"
;
import
{
NavigationContainer
}
from
'
@react-navigation/native
'
;
import
{
createNativeStackNavigator
}
from
'
@react-navigation/native-stack
'
;
import
Home
from
"
../screen/Home
"
;
import
Start
from
"
../screen/Start
"
import
Register
from
"
../screen/auth/Register
"
;
import
Login
from
"
../screen/auth/Login
"
;
import
Splash
from
"
../screen/splash/Splash
"
;
import
Color
from
"
../screen/Color
"
;
import
Blue
from
"
../screen/Blue
"
import
React
from
'
react
'
;
import
{
NavigationContainer
}
from
'
@react-navigation/native
'
;
import
{
createNativeStackNavigator
}
from
'
@react-navigation/native-stack
'
;
import
Home
from
'
../screen/Home
'
;
import
Start
from
'
../screen/Start
'
;
import
Register
from
'
../screen/auth/Register
'
;
import
Login
from
'
../screen/auth/Login
'
;
import
Splash
from
'
../screen/splash/Splash
'
;
import
Color
from
'
../screen/Color
'
;
import
Blue
from
'
../screen/Blue
'
;
import
Read
from
'
../screen/Read
'
;
const
Stack
=
createNativeStackNavigator
();
const
AppRouter
=
()
=>
{
return
(
return
(
<
NavigationContainer
>
<
Stack
.
Navigator
initialRouteName
=
"
Splash
"
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Home
"
component
=
{
Home
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Splash
"
component
=
{
Splash
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Register
"
component
=
{
Register
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Login
"
component
=
{
Login
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Start
"
component
=
{
Start
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Color
"
component
=
{
Color
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Blue
"
component
=
{
Blue
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Home
"
component
=
{
Home
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Splash
"
component
=
{
Splash
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Register
"
component
=
{
Register
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Login
"
component
=
{
Login
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Start
"
component
=
{
Start
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Color
"
component
=
{
Color
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Blue
"
component
=
{
Blue
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Read
"
component
=
{
Read
}
/
>
<
/Stack.Navigator
>
<
/NavigationContainer
>
)
}
);
}
;
export
default
AppRouter
;
frontend/src/screen/Read.js
0 → 100644
View file @
4048a704
import
{
useNavigation
}
from
'
@react-navigation/native
'
;
import
axios
from
'
axios
'
;
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
{
StyleSheet
,
View
,
Text
,
Pressable
,
SafeAreaView
,
ScrollView
,
Image
,
ImageBackground
,
Dimensions
,
Animated
,
Easing
,
NativeModules
,
}
from
'
react-native
'
;
import
ImageButton
from
'
../component/ImageButton
'
;
import
ColorActivity
from
'
../component/colorActivity
'
;
// const {width,height} = Dimensions.get('screen');
const
webUrel
=
'
http://192.168.8.101:5000/ru
'
;
export
default
function
Read
()
{
const
[
names
,
setNames
]
=
useState
([]);
const
navigation
=
useNavigation
();
function
getSMSReport
()
{
axios
.
get
(
webUrel
)
.
then
(
response
=>
{
console
.
log
(
response
);
})
.
catch
(
err
=>
{
setNotify
({
isOpen
:
true
,
message
:
err
.
message
,
type
:
'
warning
'
,
});
});
}
useEffect
(()
=>
{
getSMSReport
();
});
return
(
<
SafeAreaView
>
<
ScrollView
>
<
View
>
<
View
>
<
ImageBackground
source
=
{
require
(
'
../assets/color/background.png
'
)}
style
=
{
styles
.
image
}
>
<
Text
style
=
{
styles
.
title
}
>
Read
Activity
<
/Text
>
<
/ImageBackground
>
<
/View
>
<
/View
>
<
ColorActivity
><
/ColorActivity
>
<
ColorActivity
><
/ColorActivity
>
<
ColorActivity
><
/ColorActivity
>
<
ColorActivity
><
/ColorActivity
>
<
ColorActivity
><
/ColorActivity
>
<
/ScrollView
>
<
/SafeAreaView
>
);
}
const
styles
=
StyleSheet
.
create
({
imageContainer
:
{
flexDirection
:
'
row
'
,
marginTop
:
70
,
},
imageView
:
{
flex
:
1
,
width
:
'
90%
'
,
height
:
200
,
// borderWidth:1,
// borderColor: "#000",
marginHorizontal
:
15
,
borderRadius
:
50
,
},
image
:
{
width
:
'
100%
'
,
height
:
250
,
},
title
:
{
color
:
'
white
'
,
fontSize
:
40
,
position
:
'
absolute
'
,
left
:
50
,
bottom
:
50
,
},
});
frontend/src/screen/home.js
View file @
4048a704
...
...
@@ -13,14 +13,25 @@ export default function Home({ navigation }){
<
ScrollView
>
<
View
style
=
{
styles
.
imageContainer
}
>
<
View
style
=
{
styles
.
imageView
}
>
<
Image
style
=
{
styles
.
image
}
source
=
{
require
(
'
../assets/color/background.png
'
)}
resizeMode
=
"
contain
"
>
<
/Image
>
<
ImageButton
path
=
"
Color
"
title
=
"
Color Activity
"
/>
<
Image
style
=
{
styles
.
image
}
source
=
{
require
(
'
../assets/color/background.png
'
)}
resizeMode
=
"
contain
"
><
/Image
>
<
ImageButton
path
=
"
Color
"
title
=
"
Color Activity
"
/>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
imageContainer
}
>
<
View
style
=
{
styles
.
imageView
}
>
<
Image
style
=
{
styles
.
image
}
source
=
{
require
(
'
../assets/color/background.png
'
)}
resizeMode
=
"
contain
"
><
/Image
>
<
ImageButton
path
=
"
Read
"
title
=
"
Read Activity
"
/>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/SafeAreaView
>
)
)
;
}
...
...
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