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
9a1e772c
Commit
9a1e772c
authored
Mar 31, 2022
by
Neranga K.T.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
component->memory folder added
parent
ce503d91
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
129 additions
and
0 deletions
+129
-0
frontend/src/component/memory/CategoryItem.js
frontend/src/component/memory/CategoryItem.js
+76
-0
frontend/src/component/memory/Header.js
frontend/src/component/memory/Header.js
+29
-0
frontend/src/component/memory/TimeTracker.js
frontend/src/component/memory/TimeTracker.js
+24
-0
No files found.
frontend/src/component/memory/CategoryItem.js
0 → 100644
View file @
9a1e772c
import
React
from
'
react
'
;
import
{
View
,
Text
,
StyleSheet
,
TouchableOpacity
,
ImageBackground
,
TouchableNativeFeedback
,
Platform
}
from
'
react-native
'
;
const
CategoryItem
=
(
props
)
=>
{
return
(
<
View
style
=
{
styles
.
gameItem
}
>
<
TouchableOpacity
onPress
=
{
props
.
onSelectGame
}
>
<
View
>
<
View
style
=
{{
...
styles
.
gameItemRow
,
...
styles
.
gameItemHeader
}}
>
<
ImageBackground
style
=
{
styles
.
bgImage
}
source
=
{{
uri
:
props
.
image
}}
>
<
View
style
=
{
styles
.
titleContainer
}
>
<
Text
style
=
{
styles
.
title
}
numberOfLines
=
{
1
}
>
{
props
.
title
}
<
/Text
>
<
/View
>
<
/ImageBackground
>
<
/View
>
<
/View
>
<
View
style
=
{{
...
styles
.
gameItemRow
,
...
styles
.
gameItemDetails
}}
>
<
Text
>
Game
{
props
.
id
}
<
/Text
>
<
Text
>
Click
here
to
play
the
Game
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
<
/View
>
);
}
const
styles
=
StyleSheet
.
create
({
gameItem
:
{
height
:
200
,
width
:
'
100%
'
,
backgroundColor
:
'
#ccc
'
,
marginVertical
:
10
,
borderRadius
:
10
,
overflow
:
'
hidden
'
},
gameItemRow
:
{
flexDirection
:
'
row
'
},
gameItemHeader
:
{
height
:
'
90%
'
},
gameItemDetails
:
{
height
:
'
10%
'
,
paddingHorizontal
:
10
,
justifyContent
:
'
space-between
'
,
alignItems
:
'
center
'
},
bgImage
:
{
height
:
'
100%
'
,
width
:
'
100%
'
,
justifyContent
:
'
flex-end
'
},
title
:
{
color
:
'
white
'
,
fontFamily
:
'
open-sans-bold
'
,
fontSize
:
18
,
textAlign
:
'
center
'
,
},
titleContainer
:
{
padding
:
10
,
backgroundColor
:
'
rgba(0,0,0,0.5)
'
}
});
export
default
CategoryItem
;
\ No newline at end of file
frontend/src/component/memory/Header.js
0 → 100644
View file @
9a1e772c
import
React
from
'
react
'
;
import
{
View
,
Text
,
StyleSheet
,
StatusBar
,
SafeAreaView
}
from
'
react-native
'
;
import
Colors
from
'
../../constants/Colors
'
;
const
Header
=
(
props
)
=>
{
return
(
<
View
style
=
{
StyleSheet
.
header
}
>
<
Text
style
=
{
styles
.
headerTitle
}
>
Show
Time
<
/Text
>
<
/View
>
);
}
const
styles
=
StyleSheet
.
create
({
header
:
{
width
:
'
100%
'
,
height
:
90
,
paddingTop
:
36
,
backgroundColor
:
Colors
.
primary
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
},
headerTitle
:
{
color
:
'
white
'
,
fontSize
:
18
}
});
export
default
Header
;
frontend/src/component/memory/TimeTracker.js
0 → 100644
View file @
9a1e772c
import
React
from
'
react
'
;
import
{
Text
,
View
}
from
'
react-native
'
;
const
TimeTracker
=
()
=>
{
const
[
time
,
setTime
]
=
useState
(
0
);
const
[
timerOn
,
setTimeOn
]
=
useState
(
true
);
useEffect
(()
=>
{
let
interval
=
null
;
if
(
timerOn
){
interval
=
setInterval
(()
=>
{
setTime
(
prevTime
=>
prevTime
+
20
)
},
10
)
}
else
{
clearInterval
(
interval
);
}
return
()
=>
clearInterval
(
interval
);
},[
timerOn
]);
}
export
default
TimeTracker
;
\ 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