This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { ToastController } from '@ionic/angular'; | |
@Injectable({providedIn: 'root'}) | |
export class UtilityProvider{ | |
constructor( private toast: ToastController){} | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; | |
import React, { useState } from 'react'; | |
import HomeContainer from '../components/HomeContainer'; | |
import PageFooter from '../components/PageFooter'; | |
import PageHeader from '../components/PageHeader'; | |
import './Home.css'; | |
import Toast from '../components/utilities/Toast'; | |
const Home: React.FC = () => { | |
const [authenticated, setKey] = useState(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const API_URL = 'https://nodejsappapi.herokuapp.com'; | |
const mockSuccess = (value:any) => { | |
return new Promise((resolve) => { | |
setTimeout(() => resolve(value), 2000); | |
}); | |
}; | |
const mockFailure = (value:any) => { | |
return new Promise((resolve, reject) => { |