align to center

This commit is contained in:
ammarahm-ed
2020-12-31 12:01:14 +05:00
parent 156ac794b3
commit 6d78b0521a

View File

@@ -2,8 +2,12 @@ import React, { useEffect, useState } from 'react';
import {
ActivityIndicator,
Clipboard,
Dimensions, Keyboard, ScrollView, TouchableOpacity,
View
Dimensions,
InteractionManager,
Keyboard,
ScrollView,
TouchableOpacity,
View,
} from 'react-native';
import Share from 'react-native-share';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
@@ -15,7 +19,7 @@ import {
eSendEvent,
openVault,
sendNoteEditedEvent,
ToastEvent
ToastEvent,
} from '../../services/EventManager';
import PremiumService from '../../services/PremiumService';
import Sync from '../../services/Sync';
@@ -25,15 +29,13 @@ import {
COLOR_SCHEME,
COLOR_SCHEME_DARK,
COLOR_SCHEME_LIGHT,
setColorScheme
setColorScheme,
} from '../../utils/Colors';
import {db} from '../../utils/DB';
import {
eOnNewTopicAdded,
eOpenMoveNoteDialog,
refreshNotesPage
refreshNotesPage,
} from '../../utils/Events';
import {deleteItems} from '../../utils/functions';
import {MMKV} from '../../utils/mmkv';
@@ -61,7 +63,6 @@ export const ActionSheetComponent = ({
const {colors, premiumUser, user} = state;
const [refreshing, setRefreshing] = useState(false);
const [isPinnedToMenu, setIsPinnedToMenu] = useState(false);
const [note, setNote] = useState(
item
? item
@@ -191,12 +192,13 @@ export const ActionSheetComponent = ({
name: 'Delete',
icon: 'delete',
func: async () => {
close();
try {
await deleteItems(note);
} catch (e) {
console.log(e);
}
//close();
},
},
{
@@ -486,7 +488,6 @@ export const ActionSheetComponent = ({
};
const onScrollEnd = () => {
getRef().current?.handleChildScrollEnd();
};
@@ -519,7 +520,7 @@ export const ActionSheetComponent = ({
}}
/>
{!note.id && !note.dateCreated ? (
<Paragraph style={{marginVertical: 10}}>
<Paragraph style={{marginVertical: 10,alignSelf:"center"}}>
Start writing to save your note.
</Paragraph>
) : (