This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { View, Image, Text, StyleSheet } from 'react-native'; | |
| const PatientDetail = ({ route }) => { | |
| const { item } = route.params; | |
| if (!item) { | |
| return <></>; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const createCometChatFriend = async () => { | |
| if (!user || !item) { | |
| return; | |
| } | |
| setIsLoading(true); | |
| const cometChatAppId = `${cometChatConfig.cometChatAppId}`; | |
| const cometChatAppRegion = `${cometChatConfig.cometChatRegion}`; | |
| const cometChatApiKey = `${cometChatConfig.cometChatRestApiKey}`; | |
| const url = `https://${cometChatAppId}.api-${cometChatAppRegion}.cometchat.io/v3/users/${user.id}/friends`; | |
| const options = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useEffect, useState, useContext } from 'react'; | |
| import { View, Image, Text, StyleSheet, TouchableOpacity, Alert, ActivityIndicator } from 'react-native'; | |
| import { AirbnbRating } from 'react-native-ratings'; | |
| import 'react-native-get-random-values'; | |
| import { v4 as uuidv4 } from "uuid"; | |
| import Context from '../context'; | |
| import { database, databaseRef, databaseSet, databaseQuery, orderByChild, equalTo, databaseOnValue, databaseOff } from "../firebase"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { View, Image, Text, StyleSheet, TouchableOpacity } from 'react-native'; | |
| const AppointmentItem = ({ item, onItemClick, isDoctor }) => { | |
| const clickItem = () => { | |
| onItemClick(item); | |
| }; | |
| if (!item) { | |
| return <></>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useEffect, useState, useContext } from 'react'; | |
| import { View, FlatList, Text, StyleSheet } from 'react-native'; | |
| import AppointmentItem from './AppointmentItem'; | |
| import Context from '../context'; | |
| import { database, databaseRef, databaseQuery, orderByChild, equalTo, databaseOnValue, databaseOff } from "../firebase"; | |
| const Appointments = (props) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { View, Image, Text, StyleSheet, TouchableOpacity } from 'react-native'; | |
| import { AirbnbRating } from 'react-native-ratings'; | |
| const DoctorItem = ({ item, onItemClick }) => { | |
| if (!item) { | |
| return <></>; | |
| } | |
| const clickItem = () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useEffect, useState, useContext } from 'react'; | |
| import { View, FlatList, StyleSheet } from 'react-native'; | |
| import DoctorItem from './DoctorItem'; | |
| import Context from '../context'; | |
| import { database, databaseRef, databaseOnValue, databaseOff, databaseQuery, orderByChild, equalTo } from "../firebase"; | |
| const Doctors = (props) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useContext } from 'react'; | |
| import Doctors from './Doctors'; | |
| import Appointments from './Appointments'; | |
| import Context from '../context'; | |
| const Home = (props) => { | |
| const { navigation } = props; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const createCometChatAccount = async ({ id, fullname, avatar }) => { | |
| try { | |
| const authKey = `${cometChatConfig.cometChatAuthKey}`; | |
| const user = new cometChat.User(id); | |
| user.setName(fullname); | |
| user.setAvatar(avatar); | |
| const cometChatUser = await cometChat.createUser(user, authKey); | |
| if (cometChatUser) { | |
| showMessage('Info', `${fullname} was created successfully! Please sign in with your created account`); | |
| setIsLoading(false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState, useContext } from 'react'; | |
| import { StyleSheet, View, TextInput, TouchableOpacity, Text, Alert, ActivityIndicator, Image, Platform } from 'react-native'; | |
| import validator from "validator"; | |
| import SelectDropdown from 'react-native-select-dropdown'; | |
| import { launchImageLibrary } from 'react-native-image-picker'; | |
| import Context from "../context"; | |
| import { cometChatConfig } from '../env'; |