Skip to content

Commit

Permalink
Fixed css and merged nearbyheader with nearbycount
Browse files Browse the repository at this point in the history
  • Loading branch information
dyland88 committed Nov 5, 2024
1 parent f8c9853 commit 33f818b
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 73 deletions.
45 changes: 0 additions & 45 deletions client/app/components/chat/NearbyCount.tsx

This file was deleted.

60 changes: 37 additions & 23 deletions client/app/components/chat/NearbyHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,54 +1,68 @@
import React from "react";
import { View, Text, StyleSheet, Dimensions, Image } from "react-native";
import {
View,
Text,
StyleSheet,
Dimensions,
Image,
TouchableOpacity,

Check warning on line 8 in client/app/components/chat/NearbyHeader.tsx

View workflow job for this annotation

GitHub Actions / lint (21.x)

'TouchableOpacity' is defined but never used
} from "react-native";
import { ChevronLeft } from "react-native-feather";

import NearbyCount from "./NearbyCount";
import { CounterProps } from "../../types/Props";

export const NearbyHeader: React.FC<CounterProps> = ({ count }) => {
export const NearbyHeader: React.FC = () => {
return (
<View style={styles.nearbyContainer}>
<View style={{ flexDirection: "row" }}>
<ChevronLeft color="white" strokeWidth={1.4} width={40} height={40} />
<Text style={styles.nearbyText}>Nearby</Text>
<View style={styles.iconContainer}>
<Image
source={require("../../../assets/icons/arrow/angle-right.png")}
style={styles.backArrow}
style={styles.peopleIcon}
source={require("../../../assets/icons/misc/nearby_icon.png")}
/>
<Text style={styles.nearbyText}>Nearby</Text>
<NearbyCount count={count} />
<Text style={styles.countText}>{5}</Text>
</View>
</View>
);
};

const styles = StyleSheet.create({
nearbyContainer: {
display: "flex",
flexDirection: "row",
backgroundColor: "#34D1BF",
width: "100%",
alignItems: "center",
justifyContent: "space-between",
justifyContent: "flex-start",
shadowColor: "black",
shadowOffset: {width: 0, height: 2},
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.3,
shadowRadius: 2,
paddingVertical: 15,
paddingRight: 25,
paddingLeft: 10,
gap: 10,
},
nearbyText: {
fontFamily: "Quicksand",
fontSize: 24,
fontWeight: "bold",
color: "white",
textAlign: "center",
height: 70,
marginLeft: 110,
marginRight: "auto",
top: 18,
},
backArrow: {
transform: "scale(-1)",
height: 27,
width: 10,
peopleIcon: {
tintColor: "white",
position: "absolute",
marginLeft: 33,
top: 22,
height: Dimensions.get("window").height * 0.025,
width: Dimensions.get("window").height * 0.03,
},
iconContainer: {
display: "flex",
alignItems: "center",
},
countText: {
fontFamily: "Quicksand",
fontSize: 13,
fontWeight: "bold",
color: "white",
},
});

Expand Down
5 changes: 0 additions & 5 deletions client/app/types/Props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ export type MessageChannelProps = {
messages: Message[];
};

/* misc props*/
export type CounterProps = {
count: number;
};

export type SafeAreaWrapperProps = {
children: React.ReactNode;
};

0 comments on commit 33f818b

Please sign in to comment.