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
c7935084
Commit
c7935084
authored
Jan 06, 2022
by
W.D.R.P. Sandeepa
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'it18218640' into 'master'
change reusable code See merge request
!60
parents
3ed7368b
945c0634
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
frontend/src/component/ImageButton.js
frontend/src/component/ImageButton.js
+3
-2
frontend/src/router/router.js
frontend/src/router/router.js
+1
-1
frontend/src/screen/home.js
frontend/src/screen/home.js
+1
-1
No files found.
frontend/src/component/ImageButton.js
View file @
c7935084
...
@@ -2,12 +2,13 @@ import { useNavigation } from "@react-navigation/native";
...
@@ -2,12 +2,13 @@ import { useNavigation } from "@react-navigation/native";
import
React
from
"
react
"
;
import
React
from
"
react
"
;
import
{
Text
,
TouchableOpacity
,
StyleSheet
}
from
'
react-native
'
import
{
Text
,
TouchableOpacity
,
StyleSheet
}
from
'
react-native
'
export
default
function
ImageButton
(
{
title
}
){
export
default
function
ImageButton
(
props
){
const
navigation
=
useNavigation
();
const
navigation
=
useNavigation
();
const
{
title
,
path
}
=
props
;
return
(
return
(
<
TouchableOpacity
onPress
=
{()
=>
{
navigation
.
navigate
(
"
Color
"
)}}
style
=
{
styles
.
ImageButton
}
>
<
TouchableOpacity
onPress
=
{()
=>
{
navigation
.
navigate
(
path
)}}
style
=
{
styles
.
ImageButton
}
>
<
Text
style
=
{
styles
.
text
}
>
{
title
}
<
/Text
>
<
Text
style
=
{
styles
.
text
}
>
{
title
}
<
/Text
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
);
);
...
...
frontend/src/router/router.js
View file @
c7935084
...
@@ -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
=
"
Color
"
>
<
Stack
.
Navigator
initialRouteName
=
"
Splash
"
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Home
"
component
=
{
Home
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Home
"
component
=
{
Home
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Splash
"
component
=
{
Splash
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Splash
"
component
=
{
Splash
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Register
"
component
=
{
Register
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Register
"
component
=
{
Register
}
/
>
...
...
frontend/src/screen/home.js
View file @
c7935084
...
@@ -15,7 +15,7 @@ export default function Home({ navigation }){
...
@@ -15,7 +15,7 @@ export default function Home({ navigation }){
<
View
style
=
{
styles
.
imageView
}
>
<
View
style
=
{
styles
.
imageView
}
>
<
Image
style
=
{
styles
.
image
}
source
=
{
require
(
'
../assets/color/background.png
'
)}
resizeMode
=
"
contain
"
>
<
Image
style
=
{
styles
.
image
}
source
=
{
require
(
'
../assets/color/background.png
'
)}
resizeMode
=
"
contain
"
>
<
/Image
>
<
/Image
>
<
ImageButton
title
=
"
Color Activity
"
/>
<
ImageButton
path
=
"
Color
"
title
=
"
Color Activity
"
/>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/ScrollView
>
...
...
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