Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

remove warnings

ammarahm-ed7ed393941420
diff --git a/apps/mobile/src/components/ExportDialog/index.js b/apps/mobile/src/components/ExportDialog/index.js
index cc0422ee9..a962a6fee 100644
--- a/apps/mobile/src/components/ExportDialog/index.js
+++ b/apps/mobile/src/components/ExportDialog/index.js
@@ -1,18 +1,21 @@
-import React, {useEffect, useState} from 'react';
+import React, {Fragment, useEffect, useState} from 'react';
import {
Modal,
+ Platform,
StyleSheet,
Text,
TouchableOpacity,
View,
- Platform,
} from 'react-native';
+import FileViewer from 'react-native-file-viewer';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import {opacity, ph, pv, SIZE, WEIGHT} from '../../common/common';
import {useTracked} from '../../provider';
-import {DDS, getElevation, db, ToastEvent} from '../../utils/utils';
+import storage from '../../utils/storage';
+import {DDS, getElevation, ToastEvent} from '../../utils/utils';
+import {Button} from '../Button/index';
import {Loading} from '../Loading';
-import FileViewer from 'react-native-file-viewer';
+import Seperator from '../Seperator';
const {
eSubscribeEvent,
@@ -22,10 +25,6 @@ const {
eOpenExportDialog,
eCloseExportDialog,
} = require('../../services/events');
-import {Button} from '../Button/index';
-import Seperator from '../Seperator';
-import storage from '../../utils/storage';
-import RNFetchBlob from 'rn-fetch-blob';
const ExportDialog = () => {
const [state, dispatch] = useTracked();
@@ -146,7 +145,7 @@ const ExportDialog = () => {
done={complete}
doneText={doneText}
onDone={() => {
- console.log(result.type,result.filePath);
+ console.log(result.type, result.filePath);
FileViewer.open(result.filePath, {
showOpenWithDialog: true,
showAppsSuggestions: true,
@@ -174,7 +173,7 @@ const ExportDialog = () => {
</Text>
<View style={styles.buttonContainer}>
{actions.map((item) => (
- <>
+ <Fragment key={item.title}>
<Seperator half />
<Button
width="100%"
@@ -183,7 +182,7 @@ const ExportDialog = () => {
activeOpacity={opacity}
onPress={item.func}
/>
- </>
+ </Fragment>
))}
</View>
</>
diff --git a/apps/mobile/src/components/SimpleList/index.js b/apps/mobile/src/components/SimpleList/index.js
index 8a7573912..3d24bce2b 100644
--- a/apps/mobile/src/components/SimpleList/index.js
+++ b/apps/mobile/src/components/SimpleList/index.js
@@ -33,7 +33,9 @@ const SimpleList = ({
const {colors, selectionMode, user} = state;
const searchResults = {...state.searchResults};
const [refreshing, setRefreshing] = useState(false);
- const [dataProvider, setDataProvider] = useState(null);
+ const [dataProvider, setDataProvider] = useState(new DataProvider((r1, r2) => {
+ return r1 !== r2;
+ }).cloneWithRows([]));
const insets = useSafeAreaInsets();
const listData = data;
const _onScroll = (event) => {
@@ -52,6 +54,7 @@ const SimpleList = ({
/* for (var i = 0; i < 10000; i++) {
d = [...d,...data];
} */
+ console.log(d,"D")
setDataProvider(
new DataProvider((r1, r2) => {
return r1 !== r2;
@@ -228,10 +231,10 @@ const SimpleList = ({
width: '100%',
paddingTop:
Platform.OS == 'ios'
- ? data[0] && !selectionMode
+ ? listData[0] && !selectionMode
? 115
: 115 - 60
- : data[0] && !selectionMode
+ : listData[0] && !selectionMode
? 155 - insets.top
: 155 - insets.top - 60,
}}
@@ -278,7 +281,7 @@ const SearchHeader = () => {
);
};
-const LoginCard = ({type,data}) => {
+const LoginCard = ({type, data}) => {
const [state, dispatch] = useTracked();
const {colors, selectionMode, user, currentScreen} = state;
@@ -361,7 +364,7 @@ const LoginCard = ({type,data}) => {
);
};
-const ListHeaderComponent = ({type,data}) => {
+const ListHeaderComponent = ({type, data}) => {
const [state, dispatch] = useTracked();
const searchResults = {...state.searchResults};