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 React from "react"; | |
import { | |
IonContent, | |
IonGrid, | |
IonRow, | |
IonCol, | |
IonPage, | |
IonHeader, | |
IonToolbar, | |
IonTitle, |
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 React from "react"; | |
import { | |
IonContent, | |
IonGrid, | |
IonRow, | |
IonCol, | |
IonPage, | |
IonHeader, | |
IonToolbar, | |
IonTitle, |
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 React from "react"; | |
import { Redirect, Route } from "react-router-dom"; | |
import { | |
IonApp, | |
IonIcon, | |
IonLabel, | |
IonRouterOutlet, | |
IonTabBar, | |
IonTabButton, | |
IonTabs |
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 React, { useCallback, useEffect } from "react"; | |
import { | |
CameraResultType, | |
FilesystemDirectory, | |
Plugins, | |
Capacitor | |
} from "@capacitor/core"; | |
import { useCamera, availableFeatures } from "@ionic/react-hooks/camera"; | |
import { useStorage } from "@ionic/react-hooks/storage"; | |
import moment from "moment"; |
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
useEffect(() => { | |
if (photo) { | |
console.log("photo", photo); | |
Filesystem.readFile({ | |
path: photo ? photo.path || photo.webPath || "" : "" | |
}) | |
.then(photoInTemp => { | |
let date = moment().format("MM-DD-YY-h-mm-ss"); | |
let fileName = date + ".jpg"; |
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 React, { useCallback, useEffect } from "react"; | |
import { CameraResultType } from "@capacitor/core"; | |
import { useCamera, availableFeatures } from "@ionic/react-hooks/camera"; | |
import { | |
IonButton, | |
IonContent, | |
IonHeader, | |
IonToolbar, | |
IonTitle, | |
IonPage, |
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 React, { useCallback, useEffect } from 'react'; | |
import { CameraResultType } from '@capacitor/core'; | |
import { useCamera, availableFeatures } from '@ionic/react-hooks/camera'; | |
import { IonButton, IonContent, IonHeader, IonToolbar, IonTitle, IonPage, IonText } from '@ionic/react'; | |
const Camera: React.FC = () => { | |
const { photo, getPhoto } = useCamera(); | |
const triggerCamera = useCallback(async () => { | |
if(availableFeatures.getPhoto) { | |
await getPhoto({ |
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 React from 'react'; | |
import { Redirect, Route } from 'react-router-dom'; | |
import { | |
IonApp, | |
IonIcon, | |
IonLabel, | |
IonRouterOutlet, | |
IonTabBar, | |
IonTabButton, | |
IonTabs |
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 React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import App from './App'; | |
import * as serviceWorker from './serviceWorker'; | |
import { defineCustomElements } from '@ionic/pwa-elements/loader'; | |
ReactDOM.render(<App />, document.getElementById('root')); | |
defineCustomElements(window); |
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 { | |
IonCard, | |
IonCardContent, | |
IonCardHeader, | |
IonCardSubtitle, | |
IonCardTitle, | |
IonContent, | |
IonHeader, | |
IonIcon, | |
IonItem, |