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/List.jsx | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'components/List.jsx')

diff --git a/components/List.jsx b/components/List.jsx
index 3e4e11c..07551ab 100644
--- a/components/List.jsx
+++ b/components/List.jsx
@@ -2,10 +2,11 @@ import { StyleSheet, Text } from 'react-native'
 import SwipeableFlatList from 'react-native-swipeable-list'
 import { useState, useEffect } from 'react'
 import { getList } from '../utils/api'
+import { handleRemove } from "../utils/helpers";
 import Note from './Note'
 import Menu from './Menu'
 import RemoveNoteButton from './RemoveNoteButton'
-import { handleRemove } from "../utils/helpers";
+import Loader from './Loader'
 
 const List = ({ session, setSession, showError, setEdit }) => {
   const [list, setList] = useState()
@@ -50,7 +51,7 @@ const List = ({ session, setSession, showError, setEdit }) => {
       />
       {
         loading || list === undefined
-          ? <Text style={styles.text}>Loading notes...</Text>
+          ? <Loader style={{ padding: 15 }} text="Loading notes..." />
           : (
             <SwipeableFlatList
               data={list.sort(sortFn)}
@@ -74,7 +75,7 @@ const List = ({ session, setSession, showError, setEdit }) => {
 const styles = StyleSheet.create({
   text: {
     color: 'white',
-    padding: 20,
+    padding: 15,
   },
 });
 
-- 
cgit v1.2.3

