fix pinned items not showing

This commit is contained in:
ammarahm-ed
2020-04-22 11:22:20 +05:00
parent 6134ec842a
commit bc4a7b0fcb
3 changed files with 4 additions and 4 deletions

View File

@@ -127,10 +127,10 @@ const SimpleList = ({
? 155 - insets.top ? 155 - insets.top
: 155 - 60 - insets.top, : 155 - 60 - insets.top,
}}> }}>
{pinned && pinned.notebooks && pinned.notebooks.length > 0 ? ( {pinned && pinned.length > 0 ? (
<> <>
<FlatList <FlatList
data={pinned.notebooks} data={pinned}
keyExtractor={(item, index) => item.id.toString()} keyExtractor={(item, index) => item.id.toString()}
renderItem={({item, index}) => renderItem={({item, index}) =>
item.type === 'notebook' ? ( item.type === 'notebook' ? (

View File

@@ -141,7 +141,7 @@ export const Folders = ({navigation}) => {
<NotebookPlaceHolder animation={slideRight} colors={colors} /> <NotebookPlaceHolder animation={slideRight} colors={colors} />
</> </>
} }
pinned={pinned} pinned={pinned.notebooks}
placeholderText="Notebooks you add will appear here" placeholderText="Notebooks you add will appear here"
/> />
</Container> </Container>

View File

@@ -115,7 +115,7 @@ export const Home = ({navigation}) => {
data={notes} data={notes}
type="notes" type="notes"
isHome={true} isHome={true}
pinned={pinned} pinned={pinned.notes}
refreshing={refreshing} refreshing={refreshing}
focused={isFocused} focused={isFocused}
onRefresh={_onRefresh} onRefresh={_onRefresh}