mirror of
https://github.com/abhay-raizada/PeerScribe.git
synced 2026-04-26 16:24:03 +00:00
Remove unused libraries
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import {Text, TextInput, View} from 'react-native';
|
||||
import {Section} from './Section';
|
||||
import {styles, TextTheme} from './styles';
|
||||
import {styles, TextTheme} from '../common/styles';
|
||||
import {useState} from 'react';
|
||||
import {Section} from '../common/Section';
|
||||
|
||||
interface AddressForm {
|
||||
address_line_1?: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {Text, TextInput, View} from 'react-native';
|
||||
import {Section} from './Section';
|
||||
import {styles, TextTheme} from './styles';
|
||||
import {Section} from '../common/Section';
|
||||
import {styles, TextTheme} from '../common/styles';
|
||||
import {useState} from 'react';
|
||||
|
||||
interface MedicineForm {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import {Text, TextInput, View} from 'react-native';
|
||||
import {Section} from './Section';
|
||||
import {styles, TextTheme} from './styles';
|
||||
import {Text, TextInput, View, Button} from 'react-native';
|
||||
import {Section} from '../common/Section';
|
||||
import {styles, TextTheme} from '../common/styles';
|
||||
import {useState} from 'react';
|
||||
import DatePicker from 'react-native-date-picker';
|
||||
import {Button} from '@ant-design/react-native';
|
||||
|
||||
interface PatientForm {
|
||||
name?: string;
|
||||
@@ -46,21 +45,19 @@ export const PatientForm: React.FC<PatientFormProps> = ({
|
||||
<View>
|
||||
<Text style={TextTheme}>{form.date_of_birth}</Text>
|
||||
<Button
|
||||
size="small"
|
||||
onPress={() => {
|
||||
setOpenDate(true);
|
||||
}}>
|
||||
Edit
|
||||
</Button>
|
||||
}}
|
||||
title="Edit"
|
||||
/>
|
||||
</View>
|
||||
) : (
|
||||
<Button
|
||||
onPress={() => {
|
||||
setOpenDate(true);
|
||||
}}
|
||||
size="small">
|
||||
Pick a date
|
||||
</Button>
|
||||
title="Pick a date"
|
||||
/>
|
||||
)}
|
||||
<DatePicker
|
||||
modal
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import {PropsWithChildren} from 'react';
|
||||
import {Dimensions, StyleSheet, Text, View} from 'react-native';
|
||||
import {Colors} from 'react-native/Libraries/NewAppScreen';
|
||||
import {styles} from './styles';
|
||||
|
||||
type SectionProps = PropsWithChildren<{
|
||||
title: string;
|
||||
}>;
|
||||
|
||||
export function Section({children, title}: SectionProps): React.JSX.Element {
|
||||
return (
|
||||
<View style={styles.sectionContainer}>
|
||||
<Text style={styles.sectionTitle}>{title}</Text>
|
||||
<Text style={[styles.sectionDescription]}>{children}</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
@@ -1,8 +1,14 @@
|
||||
import {Alert, Appearance, Dimensions, Image, Text, View} from 'react-native';
|
||||
import {
|
||||
Alert,
|
||||
Appearance,
|
||||
Dimensions,
|
||||
Image,
|
||||
Text,
|
||||
View,
|
||||
Button,
|
||||
} from 'react-native';
|
||||
import {Colors} from 'react-native/Libraries/NewAppScreen';
|
||||
import {useEffect, useState} from 'react';
|
||||
import {Button} from '@ant-design/react-native';
|
||||
// import { SendPrescription } from './sendPrescription';
|
||||
import {Dropdown} from 'react-native-element-dropdown';
|
||||
import {
|
||||
SimplePool,
|
||||
@@ -14,7 +20,7 @@ import {
|
||||
} from 'nostr-tools';
|
||||
import EncryptedStorage from 'react-native-encrypted-storage';
|
||||
import {ImportNsec} from './ImportNsec';
|
||||
import {Section} from './Section';
|
||||
import {Section} from '../common/Section';
|
||||
import {PatientForm} from './PatientForm';
|
||||
import {AddressForm} from './AddressForm';
|
||||
import {MedicineForm} from './MedicineForm';
|
||||
@@ -203,12 +209,11 @@ export const PrescriptionCreator = () => {
|
||||
<Section title="PeerScribe">
|
||||
From the practice of {loggedInNpub}
|
||||
<Button
|
||||
size="small"
|
||||
onPress={() => {
|
||||
setShowImportNsec(true);
|
||||
}}>
|
||||
Edit!
|
||||
</Button>
|
||||
}}
|
||||
title="edit"
|
||||
/>
|
||||
</Section>
|
||||
|
||||
<Section title="Choose a Pharmacy">
|
||||
@@ -232,17 +237,16 @@ export const PrescriptionCreator = () => {
|
||||
<PatientForm nestedFormCallback={nestedFormCallback} />
|
||||
<AddressForm nestedFormCallback={nestedFormCallback} />
|
||||
<MedicineForm nestedFormCallback={nestedFormCallback} />
|
||||
<Button type="primary" onPress={handleButtonPress}>
|
||||
<Text
|
||||
<Button onPress={handleButtonPress} title="Create Rx" />
|
||||
{/* <Text
|
||||
style={[
|
||||
{
|
||||
color: Colors.light,
|
||||
},
|
||||
]}>
|
||||
{' '}
|
||||
Create RX{' '}
|
||||
</Text>
|
||||
</Button>
|
||||
</Button> */}
|
||||
</View>
|
||||
</Section>
|
||||
<ImportNsec
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
import {Dimensions, StyleSheet} from 'react-native';
|
||||
import {Colors} from 'react-native/Libraries/NewAppScreen';
|
||||
|
||||
export const styles = StyleSheet.create({
|
||||
input: {
|
||||
height: 40,
|
||||
margin: 12,
|
||||
borderWidth: 1,
|
||||
borderBottomColor: 'white',
|
||||
padding: 10,
|
||||
color: Colors.white,
|
||||
},
|
||||
sectionContainer: {
|
||||
marginTop: 32,
|
||||
paddingHorizontal: 24,
|
||||
width: Dimensions.get('window').width - 80,
|
||||
color: Colors.white,
|
||||
},
|
||||
sectionTitle: {
|
||||
fontSize: 24,
|
||||
fontWeight: '600',
|
||||
color: Colors.white,
|
||||
},
|
||||
sectionDescription: {
|
||||
marginTop: 8,
|
||||
fontSize: 18,
|
||||
fontWeight: '400',
|
||||
color: Colors.white,
|
||||
},
|
||||
highlight: {
|
||||
fontWeight: '500',
|
||||
},
|
||||
});
|
||||
|
||||
export const TextTheme = [
|
||||
{
|
||||
color: Colors.white,
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user