From 4f70b9cd80b17ff8f85e36ea0982f817e542e869 Mon Sep 17 00:00:00 2001 From: emanuelleao Date: Sat, 29 Aug 2020 00:21:10 -0300 Subject: [PATCH] mobile: alternative scrollview using View element as a containner --- mobile/src/pages/TeacherList/index.tsx | 89 ++++++++++++++++++++++---- mobile/src/pages/TeacherList/styles.ts | 6 +- 2 files changed, 82 insertions(+), 13 deletions(-) diff --git a/mobile/src/pages/TeacherList/index.tsx b/mobile/src/pages/TeacherList/index.tsx index 7ad5783..76565b5 100644 --- a/mobile/src/pages/TeacherList/index.tsx +++ b/mobile/src/pages/TeacherList/index.tsx @@ -16,6 +16,16 @@ function TeacherList (){ UIManager.setLayoutAnimationEnabledExperimental(true); } + const t: Teacher = { + avatar: 'https://avatars1.githubusercontent.com/u/42789344?s=460&u=3a1a13a37fcb2d167d1074fad580c8035891f43a&v=4', + bio: 'eeeeeeeeeeeeeeeeeeeeeeeeeeeee', + cost: 20, + id: 2, + name: 'EEEEEEEEEEEEEEEEEEE', + subject: "fefefefe", + whatsapp: '343423242', + } + const [teachers, setTeachers] = useState([]); const [isFiltersVisible, setIsFilterVisible] = useState(false); @@ -111,22 +121,77 @@ function TeacherList (){ )} - - {teachers.map((teacher: Teacher) => { - return ( + + + {teachers.map((teacher: Teacher) =>{ - )})} + })} + + + + + + + + + + + + + + + + + + + + + + ); } diff --git a/mobile/src/pages/TeacherList/styles.ts b/mobile/src/pages/TeacherList/styles.ts index 8644588..ba34695 100644 --- a/mobile/src/pages/TeacherList/styles.ts +++ b/mobile/src/pages/TeacherList/styles.ts @@ -8,7 +8,11 @@ const styles = StyleSheet.create({ }, teacherList: { - marginTop: -40 + overflow: "hidden", + marginHorizontal: 14, + marginTop: -40, + borderRadius: 7, + paddingBottom: 280, }, searchForm: {