You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// CHANGE: Call the element loader before the render call.
110
+
// CHANGE: Call the element loader before the render call
111
111
defineCustomElements(window);
112
112
113
113
const container =document.getElementById('root');
@@ -176,9 +176,9 @@ export default Tab2;
176
176
We put the visual aspects of our app into `<IonContent>`. In this case, it’s where we’ll add a button that opens the device’s camera as well as displays the image captured by the camera. Start by adding a [floating action button](../api/fab.md) (FAB) to the bottom of the page and set the camera image as the icon.
177
177
178
178
```tsx
179
-
// CHANGE: Add the following import.
179
+
// CHANGE: Add the following import
180
180
import { camera, trash, close } from'ionicons/icons';
181
-
// CHANGE: Update the following import.
181
+
// CHANGE: Update the following import
182
182
import {
183
183
IonContent,
184
184
IonHeader,
@@ -194,7 +194,7 @@ import {
194
194
IonImg,
195
195
IonActionSheet,
196
196
} from'@ionic/react';
197
-
// CHANGE: Remove or comment out `ExploreContainer`.
197
+
// CHANGE: Remove or comment out `ExploreContainer`
198
198
// import ExploreContainer from '../components/ExploreContainer';
Next, add a new bit of logic in the `loadSaved()` method. On mobile, we can directly point to each photo file on the Filesystem and display them automatically. On the web, however, we must read each image from the Filesystem into base64 format. This is because the Filesystem API uses [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) under the hood. Update the `loadSaved()` method:
0 commit comments