From 1173480fd93a56fa60333c01ffc70b67db82826a Mon Sep 17 00:00:00 2001
From: piotrruss <mail@pruss.it>
Date: Sun, 22 May 2022 18:11:30 +0100
Subject: added loader

---
 components/Edit.jsx | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

(limited to 'components/Edit.jsx')

diff --git a/components/Edit.jsx b/components/Edit.jsx
index b15b7fc..7d7f57f 100644
--- a/components/Edit.jsx
+++ b/components/Edit.jsx
@@ -1,7 +1,8 @@
-import { StyleSheet, Text, TextInput , View } from 'react-native'
+import { StyleSheet, TextInput , View } from 'react-native'
 import { useState, useEffect } from 'react'
 import { handleGetNote, handleCreateNote, handleEditNote } from '../utils/helpers'
 import Menu from './Menu'
+import Loader from './Loader'
 
 const Edit = ({ edit: note, setEdit, session, setSession, showError }) => {
   const [saving, setSaving] = useState()
@@ -39,7 +40,7 @@ const Edit = ({ edit: note, setEdit, session, setSession, showError }) => {
         />
         {
           content === undefined || saving
-            ? <Text style={styles.text}>{saving ? 'Saving...' : 'Loading content...'}</Text>
+            ? <Loader style={{paddingTop: 10}} text={saving ? 'Saving...' : 'Loading content...'} />
             : (
               <TextInput
                 placeholder="Content"
@@ -76,9 +77,6 @@ const styles = StyleSheet.create({
     flexGrow: 1,
     paddingVertical: 10,
   },
-  text: {
-    color: 'white',
-  }
 });
 
 export default Edit
-- 
cgit v1.2.3

