Skip to content

Commit

Permalink
Merge pull request #212 from atlp-rwanda/fix-popup-errors
Browse files Browse the repository at this point in the history
Fix: fixed popup errors on app startup, and in profile section
  • Loading branch information
Nkbtemmy authored Jul 17, 2024
2 parents 2832cb3 + f1e9151 commit a142c05
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 49 deletions.
5 changes: 2 additions & 3 deletions app/(app)/ActionMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default function Index() {

useEffect(() => {
if (imageUrl.length > 0) {
setProfilePhoto(imageUrl[0]?.name);
setProfilePhoto(imageUrl?.name);
}
}, [imageUrl]);

Expand Down Expand Up @@ -257,7 +257,6 @@ const specializations = [
setFavoriteDoctors(prev=>[...prev,doctorId])
}


return (
<View
style={{
Expand Down Expand Up @@ -286,7 +285,7 @@ const specializations = [
source={{
uri:authType && authType !== "apple"
? otherAuthImageUrl
: `${CDNURL + userId + "/" + profilePhoto}`,
: `${CDNURL + patientData[0]?.image}`,
}}
/>
</View>
Expand Down
14 changes: 6 additions & 8 deletions app/(app)/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import React, { useCallback, useEffect } from "react";
import { AppointmentIcon } from "@/assets/icons/AppointmentSvg";
import { ArticleIcon } from "@/assets/icons/ArticleSvg";
import { HistoryIcon } from "@/assets/icons/HistorySvg";
Expand All @@ -23,17 +23,15 @@ export default function Layout() {
<>
<Tabs
tabBar={({ state, navigation, descriptors }) => {
if (state.routeNames.includes(segments[segments.length - 1])) {
setTabVisible(true);
} else {
setTabVisible(false);
}

return (
<>
<View
style={{
display: tabVisible ? "flex" : "none",
display:
tabVisible ||
state.routeNames.includes(segments[segments.length - 1])
? "flex"
: "none",
flexDirection: "row",
justifyContent: "space-between",
backgroundColor:
Expand Down
40 changes: 22 additions & 18 deletions components/UI/Tags/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,29 @@ export default function TagsContainer({ data }: Props) {
const [selectedTagIndex, setSelectedTagIndex] = useState(0);

return (
<>
<ScrollView horizontal={true} showsHorizontalScrollIndicator={false}
contentContainerStyle={{
flexDirection: "row",
justifyContent: "space-between",
alignItems:'center'

}}>

{data.map((tag, index) =>

<>
<Chips key={index} text={tag} type={data[selectedTagIndex] === tag ?'filled':'border'} onPress={() => {
<>
<ScrollView
horizontal={true}
showsHorizontalScrollIndicator={false}
contentContainerStyle={{
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
}}
>
{data.map((tag, index) => (
<Chips
key={index}
text={tag}
type={data[selectedTagIndex] === tag ? "filled" : "border"}
onPress={() => {
setSelectedTagIndex(index);
}} size='medium' style={{marginRight:10}} />
</>
)}
</ScrollView>
}}
size="medium"
style={{ marginRight: 10 }}
/>
))}
</ScrollView>
</>

);
}
12 changes: 10 additions & 2 deletions eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@
}
},
"preview": {
"distribution": "internal"
"android": {
"buildType": "apk",
"distribution": "internal",
"env": {
"EXPO_PUBLIC_SUPABASE_URL": "https://vbwbfflzxuhktdvpbspd.supabase.co",
"EXPO_PUBLIC_SUPABASE_NON_KEY": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InZid2JmZmx6eHVoa3RkdnBic3BkIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTgyNTg0MjgsImV4cCI6MjAzMzgzNDQyOH0.eOPZwYgyg3Ic-jbXW4Rehd2RDgqf-kt4vr30w_O9h3c",
"EXPO_PUBLIC_STREAM_API_KEY": "62vt32txzc3m",
"EXPO_PUBLIC_STREAM_API_SECRET": "jwwbc8b38usnqzxmf7cx38hmckxs83u5ztfxugkwbff4cxrg38vghuav9ch4x4xr"
}
}
},
"production": {
"ios": {
Expand All @@ -21,4 +30,3 @@
"production": {}
}
}

16 changes: 0 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
"expo-checkbox": "~3.0.0",
"expo-clipboard": "~6.0.3",
"expo-crypto": "~13.0.2",
"expo-image-picker": "~15.0.7",
"expo-document-picker": "^12.0.2",
"expo-file-system": "~17.0.1",
"expo-font": "~12.0.7",
"expo-haptics": "^13.0.1",
"expo-image-manipulator": "~12.0.5",
"expo-image-picker": "~15.0.7",
"expo-linear-gradient": "~13.0.2",
"expo-linking": "~6.3.1",
"expo-local-authentication": "~14.0.1",
Expand Down Expand Up @@ -82,7 +82,6 @@
"react-native-dotenv": "^3.4.11",
"react-native-element-dropdown": "^2.12.0",
"react-native-elements": "^3.4.3",
"react-native-fbsdk-next": "^13.0.0",
"react-native-gesture-handler": "~2.16.1",
"react-native-indicators": "^0.17.0",
"react-native-modern-datepicker": "^1.0.0-beta.91",
Expand Down

0 comments on commit a142c05

Please sign in to comment.