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
628289fc
Commit
628289fc
authored
Jan 07, 2022
by
W.D.R.P. Sandeepa
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'it18218640' into 'master'
get color activities response See merge request
!74
parents
b723dee2
10092a64
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
46 deletions
+22
-46
frontend/src/router/router.js
frontend/src/router/router.js
+1
-1
frontend/src/screen/Color.js
frontend/src/screen/Color.js
+21
-45
No files found.
frontend/src/router/router.js
View file @
628289fc
...
@@ -15,7 +15,7 @@ const Stack = createNativeStackNavigator();
...
@@ -15,7 +15,7 @@ const Stack = createNativeStackNavigator();
const
AppRouter
=
()
=>
{
const
AppRouter
=
()
=>
{
return
(
return
(
<
NavigationContainer
>
<
NavigationContainer
>
<
Stack
.
Navigator
initialRouteName
=
"
S
plash
"
>
<
Stack
.
Navigator
initialRouteName
=
"
S
tart
"
>
<
Stack
.
Screen
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
options
=
{{
headerShown
:
false
}}
name
=
"
Home
"
name
=
"
Home
"
...
...
frontend/src/screen/Color.js
View file @
628289fc
...
@@ -6,46 +6,42 @@ import { StyleSheet, View, Text, Pressable, SafeAreaView, ScrollView, Image, Ima
...
@@ -6,46 +6,42 @@ import { StyleSheet, View, Text, Pressable, SafeAreaView, ScrollView, Image, Ima
import
ImageButton
from
"
../component/ImageButton
"
;
import
ImageButton
from
"
../component/ImageButton
"
;
import
ColorActivity
from
"
../component/colorActivity
"
;
import
ColorActivity
from
"
../component/colorActivity
"
;
// const {width,height} = Dimensions.get('screen');
const
webUrel
=
"
http://192.168.8.101:5000/getColorActivities
"
;
const
webUrel
=
"
http://192.168.8.101:5000/ru
"
;
export
default
function
Color
(){
export
default
function
Color
(){
const
[
names
,
setNames
]
=
useState
([]);
const
[
datas
,
setData
]
=
useState
([]);
const
navigation
=
useNavigation
();
const
navigation
=
useNavigation
();
function
getColorActivities
()
{
axios
.
get
(
webUrel
)
.
then
((
response
)
=>
{
setData
(
response
.
data
);
console
.
log
(
response
.
data
);
})
.
catch
((
err
)
=>
{
setNotify
({
isOpen
:
true
,
message
:
err
.
message
,
type
:
"
warning
"
,
});
});
}
React
.
useEffect
(()
=>
{
React
.
useEffect
(()
=>
{
getColorActivities
()
const
unsubscribe
=
navigation
.
addListener
(
"
focus
"
,
()
=>
{
const
unsubscribe
=
navigation
.
addListener
(
"
focus
"
,
()
=>
{
// The screen is focused
// Call any action
Orientation
.
unlockAllOrientations
();
Orientation
.
unlockAllOrientations
();
Orientation
.
lockToPortrait
();
Orientation
.
lockToPortrait
();
});
});
// Return the function to unsubscribe from the event so it gets removed on unmount
return
unsubscribe
;
return
unsubscribe
;
},
[
navigation
]);
},
[
navigation
]);
// function getSMSReport() {
// axios
// .get(webUrel)
// .then((response) => {
// console.log(response.data);
// // setNames(response.data)
// })
// .catch((err) => {
// console.log(err);
// });
// }
// useEffect(() =>{
// getSMSReport();
// })
return
(
return
(
<
SafeAreaView
>
<
SafeAreaView
>
...
@@ -59,26 +55,6 @@ const[names,setNames] = useState([]);
...
@@ -59,26 +55,6 @@ const[names,setNames] = useState([]);
<
/ImageBackground
>
<
/ImageBackground
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
ColorActivity
>
<
/ColorActivity
>
{
/* <ColorActivity>
</ColorActivity>
<ColorActivity>
</ColorActivity>
<ColorActivity>
</ColorActivity>
<ColorActivity>
</ColorActivity> */
}
<
/ScrollView
>
<
/ScrollView
>
<
/SafeAreaView
>
<
/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