11
22import DoctorCard from "../../components/cards/doctCard" ;
33import { NavigationHeader } from "@/components/NavigationHeader" ;
4- import { router } from "expo-router" ;
54import { StatusBar } from "expo-status-bar" ;
65import DocButton from "../../components/cards/DocButtons" ;
7- import ReviewButtons from "../../components/cards/ReviewButtons" ;
86import React , { useState } from "react" ;
9- import { StyleSheet , View , Image , TouchableOpacity , Text , ScrollView , Modal } from "react-native" ;
10- import { useFonts } from "expo-font" ;
7+ import { View , Image , Text , ScrollView } from "react-native" ;
118import { SearchInput } from "../../components/searchinput2" ;
12-
139export default function DoctorDetails ( ) {
14- const [ isVisible , setIsVisible ] = useState ( false ) ;
1510 const [ selectedCategory , setSelectedCategory ] = useState ( "all" ) ;
16- const toggleModal = ( ) => {
17- setIsVisible ( ! isVisible ) ;
18- }
19- let [ fontsLoaded ] = useFonts ( {
20- UrbanistBold : require ( "../../assets/fonts/Urbanist-Bold.ttf" ) ,
21- UrbanistMedium : require ( "../../assets/fonts/Urbanist-Regular.ttf" ) ,
22- UrbanistSemiBold : require ( "../../assets/fonts/Urbanist-SemiBold.ttf" ) ,
23- UrbanistRegular : require ( "../../assets/fonts/Urbanist-Regular.ttf" ) ,
24- } ) ;
25- if ( ! fontsLoaded ) {
26- return null ;
27- }
2811 const docCards = [
2912 {
3013 name : "Dr. Randy Wigham" ,
@@ -51,7 +34,7 @@ export default function DoctorDetails() {
5134 image : require ( "../../assets/doctors/like.png" ) ,
5235 stars : "4.8" ,
5336 reviews : "6,362" ,
54- images : require ( "../../assets/doctors/doc1 .png" ) ,
37+ images : require ( "../../assets/doctors/doc2 .png" ) ,
5538 } ,
5639 {
5740 name : "Dr. Elijah Baranick" ,
@@ -79,182 +62,30 @@ export default function DoctorDetails() {
7962
8063
8164 return (
82- < View style = { styles . mainContainer } >
65+ < View className = "flex-1 bg-white" >
8366 < ScrollView showsVerticalScrollIndicator = { false } >
8467 < View className = "flex-1 bg-white px-4 py-5" >
8568 < View className = "pt-10" >
8669
87- < View className = "flex-row" >
70+ < View className = "flex-row justify-around " >
8871 < NavigationHeader title = "" />
8972 < SearchInput />
9073 </ View >
9174
9275 < DocButton selectedCategory = { selectedCategory } onCategorySelect = { setSelectedCategory } />
9376 </ View >
94- < View style = { styles . found } >
95- < Text style = { styles . btnTxt } > 489 founds</ Text >
77+ < View className = "px-[10px] my-[15px] flex-row justify-between" >
78+ < Text className = "text-[#212121] text-[20px] font-UrbanistRegular" > 489 founds</ Text >
9679 < View className = "flex-row" >
97- < Text style = { styles . default } onPress = { toggleModal } > Default </ Text >
80+ < Text className = "text-[#246BFD] text-[16px] font-UrbanistRegular" > Default </ Text >
9881 < Image source = { require ( "../../assets/doctors/arrows.png" ) } />
9982 </ View >
10083 </ View >
10184 { filteredDocCards . map ( ( spot , index ) => (
10285 < DoctorCard key = { index } { ...spot } />
10386 ) ) }
104-
105- < Modal
106- visible = { isVisible }
107- animationType = "fade"
108- transparent = { true }
109- onRequestClose = { toggleModal }
110- >
111- < View style = { { flex : 1 , justifyContent : 'flex-end' , alignItems : 'flex-end' , backgroundColor : 'rgba(0,0,0,0.5)' } } >
112- < View style = { { backgroundColor : 'white' , borderTopRightRadius : 48 , borderTopLeftRadius : 48 } } >
113- < Text style = { styles . title2 } > Filter</ Text >
114- < Text style = { styles . line } > </ Text >
115- < View >
116- < Text style = { styles . subtitles } > Speciality
117- </ Text >
118- < DocButton selectedCategory = { selectedCategory } onCategorySelect = { setSelectedCategory } />
119- < Text style = { styles . subtitles } > Rating
120- </ Text >
121- < ReviewButtons />
122- < Text style = { styles . line } > </ Text >
123- </ View >
124- < View style = { styles . btns } >
125- < TouchableOpacity style = { styles . regularBn } onPress = { ( ) => {
126- setIsVisible ( false )
127- } } >
128- < Text style = { styles . buttonText } > Reset</ Text >
129- </ TouchableOpacity >
130- < TouchableOpacity style = { styles . activeBn } onPress = { ( ) => {
131- setIsVisible ( false )
132- } } >
133- < Text style = { styles . activeTxt } > Apply</ Text >
134- </ TouchableOpacity >
135-
136-
137- </ View >
138- </ View >
139- </ View >
140- </ Modal >
14187 </ View >
14288 </ ScrollView >
14389 </ View >
14490 )
14591}
146- const styles = StyleSheet . create ( {
147- mainContainer : {
148- flex : 1 ,
149- backgroundColor : "white" ,
150- } ,
151- activeBtn : {
152- backgroundColor : "#246BFD" ,
153- paddingVertical : 8 ,
154- paddingHorizontal : 20 ,
155- borderRadius : 100 ,
156- } ,
157- activeText : {
158- color : "#FFFFFF" ,
159- fontFamily : "UrbanistRegular"
160- } ,
161- btns : {
162- flexDirection : "row" ,
163- justifyContent : "space-between" ,
164- margin : 10 ,
165-
166- } ,
167- title : {
168- textAlign : "center" ,
169- fontSize : 24 ,
170- fontFamily : "UrbanistBold"
171- } ,
172-
173- btnText : {
174- color : "#246BFD" ,
175- } ,
176- images : {
177- width : 28 ,
178- height : 28 ,
179- marginHorizontal : 10 ,
180- marginTop : 15 ,
181- } ,
182- title2 : {
183- fontSize : 24 ,
184- color : "#212121" ,
185- textAlign : "center" ,
186- fontFamily : "UrbanistBold" ,
187- marginVertical : 10 ,
188- } ,
189- found : {
190- paddingHorizontal : 10 ,
191- marginVertical : 15 ,
192- flexDirection : "row" ,
193- justifyContent : "space-between" ,
194- } ,
195- default : {
196- color : "#246BFD" ,
197- fontSize : 16 ,
198- fontFamily : "UrbanistRegular"
199- } ,
200- titleResult : {
201- fontSize : 24 ,
202- paddingVertical : 15 ,
203- } ,
204- activeBn : {
205- backgroundColor : "#246BFD" ,
206- width : 184 ,
207- height : 58 ,
208- paddingHorizontal : 18 ,
209- paddingVertical : 16 ,
210- borderRadius : 100 ,
211- } ,
212- activeTxt : {
213- color : "#FFFFFF" ,
214- textAlign : "center" ,
215- fontFamily : "UrbanistBold" ,
216- fontSize : 16 ,
217- } ,
218- regularBn : {
219- backgroundColor : "#E9F0FF" ,
220- width : 184 ,
221- height : 58 ,
222- paddingVertical : 18 ,
223- paddingHorizontal : 16 ,
224- borderRadius : 100 ,
225- marginHorizontal : 1 ,
226- } ,
227- line : {
228- marginVertical : 15 ,
229- borderWidth : 0.3 ,
230- paddingHorizontal : 50 ,
231- height : 0 ,
232- backgroundColor : "#EEEEEE" ,
233- opacity : 0.1 ,
234- } ,
235- buttonText : {
236- color : "#246BFD" ,
237- textAlign : "center" ,
238- fontFamily : "UrbanistBold" ,
239- fontSize : 16 ,
240- } ,
241- buttons : {
242- flexDirection : "row" ,
243- justifyContent : "space-between" ,
244- marginVertical : 10 ,
245- marginHorizontal : 15 ,
246- } ,
247- subtitles : {
248- color : "#212121" ,
249- fontSize : 18 ,
250- marginVertical : 15 ,
251- marginLeft : 20 ,
252- fontFamily : "UrbanistBold"
253- } ,
254- btnTxt : {
255- color : "#212121" ,
256- fontSize : 20 ,
257- fontFamily : "UrbanistRegular"
258-
259- }
260- } ) ;
0 commit comments