diff --git a/app/(app)/ActionMenu/FavoriteDoctorScreen.tsx b/app/(app)/ActionMenu/FavoriteDoctorScreen.tsx index 58d9ce39..b35ef208 100644 --- a/app/(app)/ActionMenu/FavoriteDoctorScreen.tsx +++ b/app/(app)/ActionMenu/FavoriteDoctorScreen.tsx @@ -1,5 +1,5 @@ import React,{ReactElement, useState} from 'react'; -import { StyleSheet, Text, Image, View, TouchableHighlight, SafeAreaView, Button, Alert, Platform, StatusBar, Dimensions,TextInput, ScrollView, Pressable} from 'react-native' +import { StyleSheet, Text, Image, View, TouchableHighlight, SafeAreaView, Button, Alert, Platform, Dimensions,TextInput, ScrollView, Pressable} from 'react-native' import { Feather } from '@expo/vector-icons'; import { AntDesign } from '@expo/vector-icons'; import { Ionicons } from '@expo/vector-icons'; @@ -18,9 +18,12 @@ import FoundDoctorCount from '@/components/FoundDoctorCount'; import NofoundComponent from '@/components/NofoundComponent'; import RemovefavoritePopup from '@/components/RemovefavoritePopup'; import FilterPopup from '@/components/FilterSearchComponent'; +import { StatusBar } from 'expo-status-bar'; import NotFoundScreen from '@/app/+not-found'; import { ThemeContext } from '@/ctx/ThemeContext'; import { useContext } from 'react'; +import { ThemeContext } from '@/ctx/ThemeContext'; +import { useContext } from 'react'; interface imageMapProp{ @@ -95,7 +98,8 @@ function DoctorScreen() { const filteredDoctors=searchTerm.length>0 ? selectedCategory.Doctors.filter(doctor=>doctor.name.toLowerCase().includes(searchTerm)):selectedCategory.Doctors return ( - + + @@ -237,7 +241,7 @@ const styles = StyleSheet.create({ alignItems: "center", width:"100%", marginBottom: "7%", - marginTop: "8%", + marginTop: "18%", }, foundDoctorView: { width: "100%", diff --git a/app/(app)/Appointments/MessagingAppointment/index.tsx b/app/(app)/Appointments/MessagingAppointment/index.tsx index d5f65a65..8beb192d 100644 --- a/app/(app)/Appointments/MessagingAppointment/index.tsx +++ b/app/(app)/Appointments/MessagingAppointment/index.tsx @@ -38,6 +38,7 @@ interface PatientType{ function AppointmentMessaging() { const { theme, changeTheme } = useContext(ThemeContext); + changeTheme("light") const ios = Platform.OS === "ios"; diff --git a/components/DoctorComponent.tsx b/components/DoctorComponent.tsx index dec0573a..12fdf9fa 100644 --- a/components/DoctorComponent.tsx +++ b/components/DoctorComponent.tsx @@ -13,16 +13,18 @@ interface DoctorComponentProps{ star: ReactElement, rate: string, review: string, - remove:()=>void + remove: () => void, + backgroundStyle?:any } -function DoctorComponent({ imageSource, name, iconComponent, professionalTitle, hospital, star, rate, review, remove }: DoctorComponentProps) { +function DoctorComponent({ imageSource, name, iconComponent, professionalTitle, hospital, star, rate, review, remove,backgroundStyle }: DoctorComponentProps) { const { theme, changeTheme } = useContext(ThemeContext) const containerStyle = theme === "dark" ? styles.outerDark : styles.outerLight const nameColor = theme === "dark" ? styles.textDark : styles.textLight const descriptionColor = theme === "dark" ? styles.descriptionDark : styles.descriptionLight + const horizontalColor=theme==="dark"?styles.horizontalDark:styles.horizontalLight return ( - + @@ -40,7 +42,7 @@ function DoctorComponent({ imageSource, name, iconComponent, professionalTitle, - + @@ -201,9 +203,15 @@ const styles = StyleSheet.create({ horizontal: { width: "100%", borderWidth: 1, - borderColor:"#EEEEEE", marginBottom: "5%", - backgroundColor:"#EEEEEE" + }, + horizontalLight: { + borderColor:"#EEEEEE" + + }, + horizontalDark: { + borderColor:"#35383F" + }, reviewView: { display: "flex", diff --git a/components/FilterSearchComponent.tsx b/components/FilterSearchComponent.tsx index 5362fd4b..38c7aa49 100644 --- a/components/FilterSearchComponent.tsx +++ b/components/FilterSearchComponent.tsx @@ -10,6 +10,8 @@ import { overlay } from 'react-native-paper'; import DoctorComponent from './DoctorComponent'; import Ratebtn from './Ratebtn'; import { Rating } from 'react-native-elements'; +import { ThemeContext } from '@/ctx/ThemeContext'; +import { useContext } from 'react'; interface iconMappingProp{ @@ -30,6 +32,12 @@ export const iconMapping:iconMappingProp = { function FilterPopup({ visible, onClose, cancel, }: RemovefavoritepopProps) { + const { theme, changeTheme } = useContext(ThemeContext) + const outerBackgroundColor = theme === "dark" ? styles.viewDark : styles.viewLight + const titleColor = theme === "dark" ? styles.whiteTitle : styles.introColor + const horizontalColor = theme === 'dark' ? styles.darkHorizontal : styles.greyHorizontal + const resetButtonColor = theme === "dark" ? "#35383F" : "#E9F0FF" + const resetbtnTextColor = theme === "dark" ? "white" : "#246BFD" const [selectedCategory, setSelectedCategory] = useState(data.categories[0]) const [showpopUp, setShowPopup] = useState(false) const [selectedDoctor, setSelectedDoctor] = useState() @@ -60,14 +68,14 @@ function FilterPopup({ visible, onClose, cancel, }: RemovefavoritepopProps) { if(!visible) return null return ( - - - Filter - + + + Filter + - Speciality - + Speciality + - Rating - + Rating + - + - {foundText} + {foundText} @@ -66,6 +71,10 @@ const styles = StyleSheet.create({ countView: { + }, + countTextWhite: { + color:"white" + }, countText: { color: "#212121", diff --git a/components/HeaderComponent.tsx b/components/HeaderComponent.tsx index 55c253a4..bb50d39a 100644 --- a/components/HeaderComponent.tsx +++ b/components/HeaderComponent.tsx @@ -11,6 +11,11 @@ import { useContext } from 'react'; import { searchWhiteIcon } from '@/assets/icons/SearchWhiteIcon'; import { LeftArrowWhite } from '@/assets/icons/LeftArrowWhite'; import { moreWhiteIcon } from '@/assets/icons/MoreWhite'; +import { ThemeContext } from '@/ctx/ThemeContext'; +import { useContext } from 'react'; +import { searchWhiteIcon } from '@/assets/icons/SearchWhiteIcon'; +import { LeftArrowWhite } from '@/assets/icons/LeftArrowWhite'; +import { moreWhiteIcon } from '@/assets/icons/MoreWhite'; interface Headerprops{ onSearchPressed: () => void, @@ -27,7 +32,7 @@ function HeaderComponent({ onSearchPressed, headerText }: Headerprops) { return ( - router.back()}> + router.back()} style={styles.leftArrowVIew}> @@ -61,6 +66,14 @@ const styles = StyleSheet.create({ marginBottom: "5%", marginTop: "12%", }, + leftArrowVIew: { + height: "100%", + width:"12%", + display: "flex", + flexDirection:"row", + justifyContent: "center", + alignItems: "center", + }, searchComponent: { }, @@ -74,9 +87,10 @@ const styles = StyleSheet.create({ upperLeft: { display: "flex", flexDirection: "row", + alignItems:"center", justifyContent: 'space-between', width: "70%", - height:"100%", + height: "100%", }, searchView: { display: "flex", diff --git a/components/Icons/Icons.ts b/components/Icons/Icons.ts index 04ed72ad..49f9f8b4 100644 --- a/components/Icons/Icons.ts +++ b/components/Icons/Icons.ts @@ -67,7 +67,8 @@ export const line = ` -`; +` +; export const VideoCall = ` diff --git a/components/NofoundComponent.tsx b/components/NofoundComponent.tsx index c2152e2b..e5301f50 100644 --- a/components/NofoundComponent.tsx +++ b/components/NofoundComponent.tsx @@ -2,8 +2,13 @@ import React,{ReactElement, useState} from 'react'; import { StyleSheet, Text, Image, View, TouchableHighlight, SafeAreaView, Button, Alert, Platform, StatusBar, Dimensions,TextInput, Pressable,ImageURISource} from 'react-native' import Typography from '@/constants/Typography'; import { SvgXml } from "react-native-svg" +import { ThemeContext } from '@/ctx/ThemeContext'; +import { useContext } from 'react'; function NofoundComponent() { + const { theme, changeTheme } = useContext(ThemeContext) + const NotFoundColor = theme === "dark" ? styles.NotFoundWhite : styles.NotFoundText + const sentenceTextColor=theme==="dark"?styles.sentenceTextWhite:styles.sentenceText return ( @@ -12,13 +17,13 @@ function NofoundComponent() { - Not Found + Not Found - Sorry, the keyword you entered can not be - found, please try again or search with - another keyword + Sorry, the keyword you entered can not be + found, please try again or search with + another keyword @@ -37,9 +42,7 @@ const styles = StyleSheet.create({ display: "flex", justifyContent: "center", alignItems: "center", - borderColor:"black" - - + borderColor:"black" }, outer: { @@ -50,10 +53,7 @@ const styles = StyleSheet.create({ display: "flex", justifyContent: "space-between", alignItems: "center", - borderColor:"red" - - - + borderColor:"red" }, imageView: { width:"100%", @@ -67,15 +67,15 @@ const styles = StyleSheet.create({ flexDirection: "row", justifyContent: "center", alignItems: "center", - width:"100%" - - + width:"100%" + }, + NotFoundWhite: { + color:"white" }, NotFoundText: { color: "#212121", fontWeight: "bold", - fontSize:18 - + fontSize:18 }, paragraph: { display: "flex", @@ -92,10 +92,12 @@ const styles = StyleSheet.create({ width:"100%" }, + sentenceTextWhite: { + color:"white" + }, sentenceText: { color: "#212121", fontSize: 16, - fontWeight:"300" - + fontWeight:"300" } }) \ No newline at end of file diff --git a/components/Profile/ContactsListing.tsx b/components/Profile/ContactsListing.tsx index 3a4f6971..5baf6331 100644 --- a/components/Profile/ContactsListing.tsx +++ b/components/Profile/ContactsListing.tsx @@ -3,6 +3,7 @@ import Typography from "@/constants/Typography"; import { ThemeContext } from "@/ctx/ThemeContext"; import { useContext } from "react"; import { Pressable, Text, View } from "react-native"; +import React from "react"; interface Props { icon: () => React.JSX.Element; diff --git a/components/Ratebtn.tsx b/components/Ratebtn.tsx index 651b3125..e86e51cb 100644 --- a/components/Ratebtn.tsx +++ b/components/Ratebtn.tsx @@ -49,7 +49,6 @@ const styles = StyleSheet.create({ justifyContent: "center", alignItems: "center", paddingHorizontal: 2, - backgroundColor: "white", borderWidth: 2, borderColor: "#246BFD", marginRight: 8, diff --git a/components/RemovefavoritePopup.tsx b/components/RemovefavoritePopup.tsx index 7e98dbfa..bab63cc3 100644 --- a/components/RemovefavoritePopup.tsx +++ b/components/RemovefavoritePopup.tsx @@ -7,6 +7,8 @@ import { star } from '@/assets/icons/star'; import Removebtn from './Removebtn'; import { overlay } from 'react-native-paper'; import DoctorComponent from './DoctorComponent'; +import { ThemeContext } from '@/ctx/ThemeContext'; +import { useContext } from 'react'; interface imageMapProp{ [key:string]:ReturnType @@ -37,6 +39,14 @@ const imageMap: imageMapProp = { function RemovefavoritePopup({ visible, onClose, cancel, doctor }: RemovefavoritepopProps) { + const { theme, changeTheme } = useContext(ThemeContext) + const viewBackgroundColor = theme === "dark" ? styles.viewDark : styles.viewLight + const titleColor = theme === "dark" ? styles.whiteTitle : styles.introColor + const horizontalColor = theme === 'dark' ? styles.darkHorizontal : styles.greyHorizontal + const cancelButtonColor = theme === "dark" ? "#35383F" : "#E9F0FF" + const cancelbtnTextColor = theme === "dark" ? "white" : "#246BFD" + const doctorComponenetColor = theme === "dark" ? "#181A20" : "white" + const componentViewColor=theme==="dark"?styles.componenetViewdark:styles.componentView const [showpopUp, setShowPopup] = useState(false) const [selectedDoctor,setSelectedDoctor]=useState() const handleRemove = (doctor:any) => { @@ -63,13 +73,13 @@ function RemovefavoritePopup({ visible, onClose, cancel, doctor }: Removefavorit if(!visible) return null return ( - - - Remove From Favorites? - + + + Remove From Favorites? + - + handleRemove(doctor)} + remove={() => handleRemove(doctor)} + backgroundStyle={{backgroundColor: doctorComponenetColor }} /> @@ -88,9 +99,9 @@ function RemovefavoritePopup({ visible, onClose, cancel, doctor }: Removefavorit void, filterAction?:()=>void } -function SearchComponent({onSearchSubmit,filterAction}:searchComponentProps) { +function SearchComponent({ onSearchSubmit, filterAction }: searchComponentProps) { + const { theme, changeTheme } = useContext(ThemeContext) + const leftArrowIcon = theme === "dark" ? LeftArrowWhite : leftArrow + const inputStyle = theme === "dark" ? styles.inputDarkStyle : styles.input + const outerStyle=theme==="dark"?styles.outerDark:styles.outer const [value, setValue] = useState("") const handleSearchClick = () => { onSearchSubmit(value) @@ -24,9 +31,9 @@ function SearchComponent({onSearchSubmit,filterAction}:searchComponentProps) { return ( router.back()}> - + - + @@ -35,7 +42,7 @@ function SearchComponent({onSearchSubmit,filterAction}:searchComponentProps) { @@ -70,9 +77,13 @@ const styles = StyleSheet.create({ display: "flex", flexDirection: "row", justifyContent: "space-between", - borderRadius:15 - + borderRadius:15 + }, + outerDark: { + borderWidth:2, + borderColor: "#246BFD", + backgroundColor: "#192032", }, leftArrowVIew: { @@ -82,7 +93,6 @@ const styles = StyleSheet.create({ flexDirection:"row", justifyContent: "flex-start", alignItems: "center", - backgroundColor:"white" }, searchView: { height: "100%", @@ -101,6 +111,10 @@ const styles = StyleSheet.create({ alignItems: "center", }, + inputDarkStyle: { + backgroundColor: "#192032", + color:"white" + }, input: { width: 200, height: 50, diff --git a/package-lock.json b/package-lock.json index 0a4bbee3..d3bf1701 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16202,6 +16202,19 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -16938,14 +16951,6 @@ "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.5.tgz", "integrity": "sha512-fedL7PRwmeVkgyhu9hLeTBaI6wcGk7JGJswdaRsa5aUbkXI1kr1xZwTPBtaYPpwf56878iDek6VbVnuWMebJmw==" }, - "node_modules/i": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/i/-/i-0.3.7.tgz", - "integrity": "sha512-FYz4wlXgkQwIPqhzC5TdNMLSE5+GS1IIDJZY/1ZiEPCT2S3COUVZeT5OW4BmW4r5LHLQuOosSwsvnroG9GR59Q==", - "engines": { - "node": ">=0.4" - } - }, "node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", @@ -20621,7 +20626,8 @@ "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, "node_modules/json-schema-deref-sync": { "version": "0.13.0", @@ -20884,6 +20890,139 @@ "lightningcss-win32-x64-msvc": "1.19.0" } }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.19.0.tgz", + "integrity": "sha512-wIJmFtYX0rXHsXHSr4+sC5clwblEMji7HHQ4Ub1/CznVRxtCFha6JIt5JZaNf8vQrfdZnBxLLC6R8pC818jXqg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.19.0.tgz", + "integrity": "sha512-Lif1wD6P4poaw9c/4Uh2z+gmrWhw/HtXFoeZ3bEsv6Ia4tt8rOJBdkfVaUJ6VXmpKHALve+iTyP2+50xY1wKPw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.19.0.tgz", + "integrity": "sha512-P15VXY5682mTXaiDtbnLYQflc8BYb774j2R84FgDLJTN6Qp0ZjWEFyN1SPqyfTj2B2TFjRHRUvQSSZ7qN4Weig==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.19.0.tgz", + "integrity": "sha512-zwXRjWqpev8wqO0sv0M1aM1PpjHz6RVIsBcxKszIG83Befuh4yNysjgHVplF9RTU7eozGe3Ts7r6we1+Qkqsww==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.19.0.tgz", + "integrity": "sha512-vSCKO7SDnZaFN9zEloKSZM5/kC5gbzUjoJQ43BvUpyTFUX7ACs/mDfl2Eq6fdz2+uWhUh7vf92c4EaaP4udEtA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.19.0.tgz", + "integrity": "sha512-0AFQKvVzXf9byrXUq9z0anMGLdZJS+XSDqidyijI5njIwj6MdbvX2UZK/c4FfNmeRa2N/8ngTffoIuOUit5eIQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.19.0.tgz", + "integrity": "sha512-SJoM8CLPt6ECCgSuWe+g0qo8dqQYVcPiW2s19dxkmSI5+Uu1GIRzyKA0b7QqmEXolA+oSJhQqCmJpzjY4CuZAg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, "node_modules/lightningcss-win32-x64-msvc": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.19.0.tgz",