|
@@ -1,4 +1,9 @@
|
1
|
|
-import { IonContent, IonImg, IonCard, IonCardHeader, IonCardTitle, IonPage, IonButton, IonIcon } from '@ionic/react';
|
|
1
|
+/* Created by Angel Romero, Cynthia Rivera and Jantony
|
|
2
|
+ This is the Home screen. This screen contains all the motivational
|
|
3
|
+ messages that the user will see.
|
|
4
|
+*/
|
|
5
|
+
|
|
6
|
+import { IonContent, IonImg, IonCard, IonCardHeader, IonCardTitle, IonPage, IonButton, IonIcon, useIonAlert} from '@ionic/react';
|
2
|
7
|
import { arrowDownCircle } from 'ionicons/icons';
|
3
|
8
|
import { HelpBtn } from "./components/helpButton"
|
4
|
9
|
|
|
@@ -14,7 +19,13 @@ let num = value.toString();
|
14
|
19
|
const current = new Date();
|
15
|
20
|
const date = `${current.toLocaleString('default', {month: 'long'}) } ${current.getDate()}`;
|
16
|
21
|
|
|
22
|
+
|
|
23
|
+
|
17
|
24
|
const Home: React.FC = () => {
|
|
25
|
+ // This is to present an alert when pressing the download
|
|
26
|
+ // button showing a confirmation message
|
|
27
|
+// const [presentAlert] = useIonAlert();
|
|
28
|
+
|
18
|
29
|
|
19
|
30
|
return (
|
20
|
31
|
|
|
@@ -24,11 +35,22 @@ const Home: React.FC = () => {
|
24
|
35
|
<IonContent fullscreen>
|
25
|
36
|
|
26
|
37
|
{/* Card 1 */}
|
|
38
|
+ {/* This is card that contains the motivational message */}
|
27
|
39
|
<IonCard class="moti-card" color="light">
|
28
|
40
|
<IonCardHeader class="card-header">
|
29
|
41
|
<IonCardTitle class="card-date">
|
30
|
42
|
{date}
|
31
|
|
- <IonButton fill="clear">
|
|
43
|
+ {/* Alert message */}
|
|
44
|
+ <IonButton fill="clear"
|
|
45
|
+ // onClick={() =>
|
|
46
|
+ // presentAlert({
|
|
47
|
+ // header: 'Alerta',
|
|
48
|
+ // message: 'La imagen se guardó correctamente en la galería',
|
|
49
|
+ // buttons: ['OK'],
|
|
50
|
+ // })
|
|
51
|
+ // }>
|
|
52
|
+ >
|
|
53
|
+ {/* Download message button */}
|
32
|
54
|
<IonIcon slot="icon-only" icon={arrowDownCircle} class="moti-download"></IonIcon>
|
33
|
55
|
</IonButton>
|
34
|
56
|
</IonCardTitle>
|