Skip to content

Commit

Permalink
feat:add missing type and rounding off ratings
Browse files Browse the repository at this point in the history
  • Loading branch information
Latiah committed Jul 24, 2024
1 parent cdc2661 commit 5f9f6ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/chat-history/chatHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ fetchAppointments();
message={message.message}
time={moment(`${message.created_at}`).calendar()}
color={message.sender_id === userId ? "lightblue" : "lightgrey"}
type={""}
type={message.type}
/>
))}
<View className="flex-row justify-center items-center my-3">
Expand Down
3 changes: 2 additions & 1 deletion app/doctor-appointments/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ export default function DoctorAppointmentScreen() {
starsSum += Number(review.stars);
}
if (res.length > 0) {
setAverageRating(starsSum / res.length);
let average= Math.round(starsSum / res.length)
setAverageRating(average);
} else {
setAverageRating(0);
}
Expand Down

0 comments on commit 5f9f6ab

Please sign in to comment.