Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Telemedicine_App_Development
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
Shashini Thilakarathne
Telemedicine_App_Development
Commits
fb826e23
Commit
fb826e23
authored
Mar 15, 2024
by
Shashini Thilakarathne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Landing Page UI Design
parent
16575a8b
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
465 additions
and
71 deletions
+465
-71
StressPrediction/App.js
StressPrediction/App.js
+20
-10
StressPrediction/images/Home.jpg
StressPrediction/images/Home.jpg
+0
-0
StressPrediction/images/img.jpg
StressPrediction/images/img.jpg
+0
-0
StressPrediction/package-lock.json
StressPrediction/package-lock.json
+276
-1
StressPrediction/package.json
StressPrediction/package.json
+8
-1
StressPrediction/src/index.js
StressPrediction/src/index.js
+70
-59
StressPrediction/src/landingPage.js
StressPrediction/src/landingPage.js
+91
-0
No files found.
StressPrediction/App.js
View file @
fb826e23
import
{
StyleSheet
,
View
}
from
'
react-native
'
;
import
AddData
from
'
./src
'
;
import
React
,
{
useState
}
from
'
react
'
;
import
{
View
}
from
'
react-native
'
;
import
LandingPage
from
'
./src/landingPage
'
;
import
AddData
from
'
./src/index
'
;
export
default
function
App
()
{
const
[
showAddData
,
setShowAddData
]
=
useState
(
false
);
const
handleGoToAddData
=
()
=>
{
setShowAddData
(
true
);
};
const
handleGoBack
=
()
=>
{
setShowAddData
(
false
);
};
return
(
<
View
style
=
{
styles
.
container
}
>
<
AddData
/>
<
View
style
=
{{
flex
:
1
}}
>
{
!
showAddData
?
(
<
LandingPage
onGoToAddData
=
{
handleGoToAddData
}
/
>
)
:
(
<
AddData
onGoBack
=
{
handleGoBack
}
/
>
)}
<
/View
>
);
}
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
},
});
StressPrediction/images/Home.jpg
0 → 100644
View file @
fb826e23
37.4 KB
StressPrediction/images/img.jpg
0 → 100644
View file @
fb826e23
25.4 KB
StressPrediction/package-lock.json
View file @
fb826e23
This diff is collapsed.
Click to expand it.
StressPrediction/package.json
View file @
fb826e23
...
...
@@ -9,11 +9,18 @@
"web"
:
"expo start --web"
},
"dependencies"
:
{
"@react-native-community/masked-view"
:
"^0.1.11"
,
"@react-navigation/native"
:
"^6.1.16"
,
"@react-navigation/native-stack"
:
"^6.9.25"
,
"expo"
:
"~50.0.13"
,
"expo-status-bar"
:
"~1.11.1"
,
"firebase"
:
"^9.6.11"
,
"react"
:
"18.2.0"
,
"react-native"
:
"0.73.5"
"react-native"
:
"0.73.5"
,
"react-native-gesture-handler"
:
"^2.15.0"
,
"react-native-reanimated"
:
"^3.8.0"
,
"react-native-safe-area-context"
:
"^4.9.0"
,
"react-native-screens"
:
"^3.29.0"
},
"devDependencies"
:
{
"@babel/core"
:
"^7.20.0"
...
...
StressPrediction/src/index.js
View file @
fb826e23
import
{
View
,
Text
,
StyleSheet
,
TextInput
,
Button
}
from
'
react-native
'
import
React
,
{
useState
}
from
'
react
'
import
{
db
}
from
'
../config
'
import
{
ref
,
set
}
from
'
firebase/database
'
import
React
,
{
useState
}
from
'
react
'
;
import
{
View
,
Text
,
StyleSheet
,
TextInput
,
Button
,
Image
}
from
'
react-native
'
;
import
{
db
}
from
'
../config
'
;
import
{
ref
,
set
}
from
'
firebase/database
'
;
const
AddData
=
()
=>
{
const
AddData
=
(
{
onGoBack
}
)
=>
{
const
[
title
,
setTitle
]
=
useState
(
''
);
const
[
body
,
setBody
]
=
useState
(
''
);
//function to add data to forebase realtime db
const
dataAddOn
=
()
=>
{
set
(
ref
(
db
,
'
posts/
'
+
title
),
{
set
(
ref
(
db
,
'
posts/
'
+
title
),
{
title
:
title
,
body
:
body
,
});
setTitle
(
''
)
setBody
(
''
)
}
setTitle
(
''
);
setBody
(
''
);
};
return
(
<
View
style
=
{
styles
.
container
}
>
<
Text
style
=
{
styles
.
header
}
>
Stress
Tracker
&
Wellness
Companion
<
/Text
>
<
Text
style
=
{
styles
.
header
}
>
STRESS
TRACKER
<
/Text
>
<
Image
source
=
{
require
(
'
../images/Home.jpg
'
)}
style
=
{
styles
.
image
}
/
>
<
TextInput
placeholder
=
'
Job Satisfica
tion
'
placeholder
=
'
Job Satisfac
tion
'
value
=
{
title
}
onChangeText
=
{(
text
)
=>
setTitle
(
text
)}
style
=
{
styles
.
input
}
...
...
@@ -36,11 +39,15 @@ const AddData = () => {
title
=
'
Add Data
'
onPress
=
{
dataAddOn
}
/
>
<
Button
title
=
'
Back to Landing Page
'
onPress
=
{
onGoBack
}
/
>
<
/View
>
)
}
);
}
;
export
default
AddData
export
default
AddData
;
const
styles
=
StyleSheet
.
create
({
container
:
{
...
...
@@ -48,18 +55,22 @@ const styles = StyleSheet.create({
backgroundColor
:
'
#fff
'
,
},
header
:{
fontSize
:
2
0
,
textAlign
:
'
center
'
,
marginTop
:
50
,
color
:
'
red
'
,
fontSize
:
4
0
,
textAlign
:
'
center
'
,
marginTop
:
50
,
color
:
'
black
'
,
fontWeight
:
'
bold
'
},
input
:{
borderWidth
:
1
,
borderColor
:
'
black
'
,
margin
:
10
,
padding
:
10
,
fontSize
:
18
,
borderRadius
:
6
,
borderWidth
:
1
,
borderColor
:
'
black
'
,
margin
:
10
,
padding
:
10
,
fontSize
:
18
,
borderRadius
:
6
,
},
image
:
{
width
:
'
100%
'
,
height
:
200
,
}
});
\ No newline at end of file
});
StressPrediction/src/landingPage.js
0 → 100644
View file @
fb826e23
import
React
,
{
useRef
,
useEffect
}
from
'
react
'
;
import
{
View
,
Text
,
TouchableOpacity
,
ImageBackground
,
StyleSheet
,
Animated
}
from
'
react-native
'
;
const
LandingPage
=
({
onGoToAddData
})
=>
{
const
fadeAnim
=
useRef
(
new
Animated
.
Value
(
0
)).
current
;
useEffect
(()
=>
{
Animated
.
loop
(
Animated
.
sequence
([
Animated
.
timing
(
fadeAnim
,
{
toValue
:
1
,
duration
:
1000
,
useNativeDriver
:
true
,
}),
Animated
.
timing
(
fadeAnim
,
{
toValue
:
0
,
duration
:
1000
,
useNativeDriver
:
true
,
}),
])
).
start
();
},
[]);
return
(
<
View
style
=
{
styles
.
container
}
>
<
Text
>
S
T
R
E
S
S
T
R
A
C
K
E
R
<
/Text
>
<
ImageBackground
source
=
{
require
(
'
../images/img.jpg
'
)}
style
=
{
styles
.
backgroundImage
}
>
<
Animated
.
View
style
=
{{
opacity
:
fadeAnim
,
}}
>
<
/Animated.View
>
<
/ImageBackground
>
<
View
style
=
{
styles
.
rectangle
}
>
<
Animated
.
View
style
=
{{
opacity
:
fadeAnim
,
}}
>
<
TouchableOpacity
style
=
{
styles
.
button
}
onPress
=
{
onGoToAddData
}
>
<
Text
style
=
{
styles
.
buttonText
}
>
GET
STARTED
<
/Text
>
<
/TouchableOpacity
>
<
/Animated.View
>
<
/View
>
<
/View
>
);
};
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
},
backgroundImage
:
{
width
:
400
,
height
:
400
,
resizeMode
:
'
cover
'
,
overflow
:
'
hidden
'
,
borderRadius
:
300
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
},
rectangle
:
{
width
:
'
100%
'
,
height
:
50
,
backgroundColor
:
'
#F0B27A
'
,
position
:
'
absolute
'
,
bottom
:
0
,
borderTopLeftRadius
:
40
,
borderTopRightRadius
:
40
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
},
button
:
{
backgroundColor
:
'
#F0B27A
'
,
padding
:
10
,
borderRadius
:
5
,
},
buttonText
:
{
color
:
'
#273746
'
,
fontSize
:
18
,
fontWeight
:
'
bold
'
,
},
});
export
default
LandingPage
;
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