Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
144cdfb
index 수정
cks-wls Feb 28, 2025
42e649f
Add files via upload
cks-wls Feb 28, 2025
a5a2cd6
Editicon
cks-wls Feb 28, 2025
b0cdaaf
Update healthStatusRecordList.tsx
cks-wls Feb 28, 2025
e8820f7
Update healthStatusRecordList.tsx
cks-wls Feb 28, 2025
d62ede7
save버튼 위치 조정
cks-wls Mar 15, 2025
d193f51
컴포넌트로 분리
cks-wls Mar 19, 2025
43b30f1
docs : healthStatus컴포넌트 파일 추가
cks-wls Mar 19, 2025
f947389
docs : medicalRecord 컴포넌트 파일 추가
cks-wls Mar 19, 2025
7134d48
docs : disease Data 상수값분리
cks-wls Mar 19, 2025
d2b4ee9
docs : healthstatus 상수값분리
cks-wls Mar 19, 2025
e4407bc
docs : hospitalData 상수값분리
cks-wls Mar 19, 2025
0614b1a
docs : medicalRecordList 상수값 분리
cks-wls Mar 19, 2025
51d18d9
docs : list형태 컴포넌트화
cks-wls Mar 19, 2025
2cf09f3
docs : list형태 컴포넌트화
cks-wls Mar 19, 2025
1a6256a
docs : healthStatusRecord 컴포넌트파일추가
cks-wls Mar 19, 2025
ea955e8
docs : healthStatusRecord 컴포넌트화
cks-wls Mar 19, 2025
65911c0
setting : 변수이름변경
cks-wls Mar 19, 2025
8825fc7
docs : 파일이름 변경
cks-wls Mar 19, 2025
c1c75dc
docs : 파일이름 변경
cks-wls Mar 19, 2025
bc127ca
docs : 파일이름 변경으로 인한 삭제
cks-wls Mar 19, 2025
2608371
docs : 파일이름 변경으로 인한 삭제
cks-wls Mar 19, 2025
bcbb630
docs : 파일경로변경
cks-wls Mar 21, 2025
91a6148
docs : 컴포넌트 간단화
cks-wls Mar 21, 2025
d92317c
docs : 컴포넌트 간단화
cks-wls Mar 21, 2025
21a975d
docs : 컴포넌트 간단화
cks-wls Mar 21, 2025
4ec2624
fix : 오류 수정
cks-wls Mar 21, 2025
ac8345a
docs : 반복내용 컴포넌트화
cks-wls Mar 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 143 additions & 0 deletions app/(tabs)/records/healthStatusRecordList.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
import { View, Text, StyleSheet, SafeAreaView, TouchableOpacity } from 'react-native';
import { useRouter } from 'expo-router';
import { Ionicons } from '@expo/vector-icons';

export default function MedicalRecordList() {
const router = useRouter();

const diease = [
'diabetes,colic1',
'diabetes,colic2',
'diabetes,colic3',
'diabetes,colic4',
'diabetes,colic5',
];
Comment thread
cks-wls marked this conversation as resolved.
Outdated

const handleNavigate = (dieaseName) => {
if (dieaseName === diease[0]) {
router.push('/(tabs)/records/healthStatusRecordListFull1');
} else if (dieaseName === diease[1]) {
router.push('/(tabs)/records/healthStatusRecordListFull2');
} else if (dieaseName === diease[2]) {
router.push('/(tabs)/records/healthStatusRecordListFull3');
} else if (dieaseName === diease[3]) {
router.push('/(tabs)/records/healthStatusRecordListFull4');
} else if (dieaseName === diease[4]) {
router.push('/(tabs)/records/healthStatusRecordListFull5');
}
};

const handleNewPress = () => {
router.push('/(tabs)/records/healthStatusRecordListEdit1');
};

return (
<SafeAreaView style={styles.container}>
<View style={styles.header}>
<TouchableOpacity
onPress={() => router.replace('/(tabs)/records')}
style={styles.backButton}
>
<Ionicons name="chevron-back" size={24} color="black" />
</TouchableOpacity>
<Text style={styles.headerTitle}>Health Record</Text>
</View>

{diease.map((dieaseItem, index) => (
<View key={index}>
<View style={styles.date}>
<Text style={styles.dateText}>2024.11.20</Text> {/* 임시 날짜 */}
</View>
<View style={styles.list}>
<TouchableOpacity
onPress={() => handleNavigate(dieaseItem)}
style={styles.listItem}
>
<Text style={styles.listText}>{dieaseItem}</Text>
<Ionicons name="chevron-forward" size={20} color="black" />
</TouchableOpacity>
</View>
</View>
))}

<TouchableOpacity onPress={handleNewPress} style={styles.fabButton}>
<Text style={styles.fabText}>+ New</Text>
</TouchableOpacity>
</SafeAreaView>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#F5F9FC",
},
backButton: {
left: 24,
position: "absolute",
zIndex: 1,
},
header: {
marginTop: 16,
flexDirection: "row",
position: "relative",
},
headerTitle: {
margin: 0,
fontSize: 20,
fontWeight: 500,
flex: 1,
color: "#000",
textAlign: "center",
left: 0,
right: 0,
},
date: {
marginTop: 24,
marginLeft: 24,
marginBottom: 8,
},
dateText: {
color: "#767676",
fontSize: 14,
fontWeight: 400,
},
list: {
marginLeft: 16,
marginRight: 16,
paddingTop: 16,
paddingBottom: 16,
borderRadius: 10,
backgroundColor: "#FFF",
paddingHorizontal: 16,
},
listItem: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
},
listText: {
color: "#000",
fontSize: 16,
fontWeight: 400,
},
fabButton: {
position: 'absolute',
bottom: 40,
right: 20,
backgroundColor: '#0097A7',
borderRadius: 24,
paddingHorizontal: 16,
paddingVertical: 12,
shadowColor: '#000',
shadowOpacity: 0.15,
shadowOffset: { width: 0, height: 3 },
shadowRadius: 3,
elevation: 3,
},
fabText: {
color: '#FFFFFF',
fontSize: 16,
fontWeight: '600',
},
});
Loading