diff --git a/assets/styles.ts b/assets/styles.ts index be1b420..025561a 100644 --- a/assets/styles.ts +++ b/assets/styles.ts @@ -3,7 +3,15 @@ import {StyleSheet} from "react-native"; const styles = StyleSheet.create({ //StatusPage container: { flex: 1, alignItems: "stretch" }, - listContainer: { flex: 1, width: "100%", backgroundColor: 'transparent' }, + listContainer: { + flex: 1, + width: "100%", + backgroundColor: 'transparent', + flexDirection: "row", + justifyContent: "space-between", + //alignItems: "flex-start", // Aligns subheaders properly + paddingHorizontal: 10, // Adds some spacing + }, listSubheader: { fontFamily: "Medium", fontSize: 18, // Larger text @@ -12,20 +20,16 @@ const styles = StyleSheet.create({ marginBottom: 10, // Add spacing below zIndex: 0, }, - listWrapper: { flex: 1, padding: 5 }, - listRow: { - flexDirection: "row", - justifyContent: "space-between", - alignItems: "flex-start", // Aligns subheaders properly - paddingHorizontal: 10, // Adds some spacing - }, + //listWrapper: { flex: 1, padding: 5 }, listColumn: { flex: 1, paddingHorizontal: 5, zIndex: 1}, buttonContainer: { flexDirection: "row", justifyContent: "space-between", alignSelf: "stretch", + verticalAlign: "bottom", paddingHorizontal: 10, paddingBottom: 20, + marginHorizontal: 5, }, actionButton: { flex: 1, diff --git a/components/Status.tsx b/components/Status.tsx index 1aff20e..2ed8349 100644 --- a/components/Status.tsx +++ b/components/Status.tsx @@ -167,76 +167,62 @@ const Status: React.FC = ({ id, name, image, currentStatus, setStat return ( - - - - - On the Way - {messages.filter(msg => msg.Status === "On the Way") - .sort((a, b) => new Date(a.Timestamp).getTime() - new Date(b.Timestamp).getTime()) - .map(item => ( - - } - /> - - ))} - - - - - Arrived - {messages.filter(msg => msg.Status === "Arrived") - .sort((a, b) => new Date(a.Timestamp).getTime() - new Date(b.Timestamp).getTime()) - .map(item => ( - - } - /> - - ))} - - - - + + + On the Way + {messages.filter(msg => msg.Status === "On the Way") + .sort((a, b) => new Date(a.Timestamp).getTime() - new Date(b.Timestamp).getTime()) + .map(item => ( + } + /> + ))} + + + Arrived + {messages.filter(msg => msg.Status === "Arrived") + .sort((a, b) => new Date(a.Timestamp).getTime() - new Date(b.Timestamp).getTime()) + .map(item => ( + } + /> + ))} + + - - - - - - + + );