Skip to content

Commit

Permalink
fixed red buttons to orange, fixed weird nextShot button hitbox
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankreedX committed Apr 11, 2024
1 parent f93ca2e commit 95cc8ae
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 145 deletions.
2 changes: 1 addition & 1 deletion app/content/drill/[id]/description.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
TouchableOpacity,
View,
} from "react-native";
import { Button, Text } from "react-native-paper";
import { Text } from "react-native-paper";
import Carousel from "react-native-reanimated-carousel";

import ErrorComponent from "~/components/errorComponent";
Expand Down
6 changes: 4 additions & 2 deletions app/content/profile/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { MaterialIcons } from "@expo/vector-icons";
import {
BottomSheetBackdrop,
BottomSheetModal,
BottomSheetModalProvider,
} from "@gorhom/bottom-sheet";
Expand Down Expand Up @@ -273,6 +274,7 @@ function Index(props) {
ref={bottomSheetModalRef}
index={1}
snapPoints={snapPoints}
backdropComponent={BottomSheetBackdrop}
>
<View style={styles.modalContent}>
{/* Close Button */}
Expand Down Expand Up @@ -399,7 +401,7 @@ const styles = StyleSheet.create({
left: 10,
},
closeButtonText: {
color: "red",
color: "#F24D1F",
fontSize: 17,
marginLeft: 10,
marginTop: -10,
Expand Down Expand Up @@ -456,7 +458,7 @@ const styles = StyleSheet.create({
marginBottom: 20, // Increase margin bottom for more spacing
},
signOutButton: {
color: "red",
color: "#F24D1F",
fontSize: 16,
},
});
Expand Down
225 changes: 84 additions & 141 deletions app/content/team/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
import {
BottomSheetModal,
BottomSheetModalProvider,
} from "@gorhom/bottom-sheet";
import { router } from "expo-router";
import React, { useCallback, useMemo, useRef } from "react";
import {
Image,
Keyboard,
Pressable,
TouchableWithoutFeedback,
View,
} from "react-native";
import { Image, Keyboard, TouchableWithoutFeedback, View } from "react-native";
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
import {
Appbar,
Expand Down Expand Up @@ -111,145 +101,98 @@ function Index() {
style={{ backgroundColor: "FFF" }}
>
<Appbar.Content title={"Team"} />
<Appbar.Action
icon="cog"
color={"#F24E1E"}
onPress={handlePresentModalPress}
style={{ marginRight: 7 }}
/>
</Appbar.Header>
<BottomSheetModalProvider>
<KeyboardAwareScrollView
style={{ marginLeft: 20 }}
// allows opening links from search results without closing keyboard first
keyboardShouldPersistTaps="handled"
showsVerticalScrollIndicator={false}
stickyHeaderIndices={[3]}
>
<View style={{ alignItems: "center" }}>
<Image
source={{
uri: "https://upload.wikimedia.org/wikipedia/en/thumb/1/1b/Oregon_State_Beavers_logo.svg/1200px-Oregon_State_Beavers_logo.svg.png",
resizeMode: "contain",
width: 131,
height: 75,
}}
style={{ marginTop: 0 }}
/>
</View>
<View style={{ alignItems: "center" }}>
<View
style={{
flexDirection: "row",
alignItems: "baseline",
}}
>
<Text
style={{ marginTop: 0, fontSize: 30, marginRight: 0 }}
>
OSU Golf Team
</Text>

<BottomSheetModal
ref={bottomSheetModalRef}
index={1}
snapPoints={snapPoints}
onChange={handleSheetChanges}
>
<View>
<Pressable
onPress={() => {
bottomSheetModalRef.current.close();
}}
//width={"100%"}
//alignItems={"center"}
>
<Text
style={{
textAlign: "left",
marginLeft: 5,
fontSize: 15,
color: "red",
}}
>
Cancel
</Text>
</Pressable>
<Text
style={{
textAlign: "center",
fontSize: 20,
marginTop: 0,
}}
>
Team Settings
</Text>
</View>
</BottomSheetModal>
</View>
</View>

<Text style={{ textAlign: "center", marginBottom: 20 }}>
{Object.keys(userInfo).length} members
</Text>
<KeyboardAwareScrollView
style={{ marginLeft: 20 }}
// allows opening links from search results without closing keyboard first
keyboardShouldPersistTaps="handled"
showsVerticalScrollIndicator={false}
stickyHeaderIndices={[3]}
>
<View style={{ alignItems: "center" }}>
<Image
source={{
uri: "https://upload.wikimedia.org/wikipedia/en/thumb/1/1b/Oregon_State_Beavers_logo.svg/1200px-Oregon_State_Beavers_logo.svg.png",
resizeMode: "contain",
width: 131,
height: 75,
}}
style={{ marginTop: 0 }}
/>
</View>
<View style={{ alignItems: "center" }}>
<View
style={{
// default react native background color or something, so stuff scrolling behind this is less jank
backgroundColor: "#f2f2f2",
paddingBottom: 10,
paddingTop: 10,
flexDirection: "row",
alignItems: "baseline",
}}
>
<Searchbar
onChangeText={onChangeSearch}
value={searchQuery}
style={{ paddingLeft: 20, paddingRight: 20 }}
placeholder="Search team members"
/>
<Text style={{ marginTop: 0, fontSize: 30, marginRight: 0 }}>
OSU Golf Team
</Text>
</View>

<List.Section>
{foundUsers.map((user, i) => {
const userId = user["uid"];
return (
<List.Item
key={userId}
title={user.name}
left={() => (
<Avatar.Image
size={24}
source={{
uri: user.pfp,
}}
/>
)}
right={() => (
<View
</View>

<Text style={{ textAlign: "center", marginBottom: 20 }}>
{Object.keys(userInfo).length} members
</Text>
<View
style={{
// default react native background color or something, so stuff scrolling behind this is less jank
backgroundColor: "#f2f2f2",
paddingBottom: 10,
paddingTop: 10,
}}
>
<Searchbar
onChangeText={onChangeSearch}
value={searchQuery}
style={{ paddingLeft: 20, paddingRight: 20 }}
placeholder="Search team members"
/>
</View>

<List.Section>
{foundUsers.map((user, i) => {
const userId = user["uid"];
return (
<List.Item
key={userId}
title={user.name}
left={() => (
<Avatar.Image
size={24}
source={{
uri: user.pfp,
}}
/>
)}
right={() => (
<View
style={{
flexDirection: "row",
alignItems: "center",
height: 16,
}}
>
<Text
style={{
flexDirection: "row",
alignItems: "center",
height: 16,
color: roleColor(user),
}}
>
<Text
style={{
color: roleColor(user),
}}
>
{userId === currentUserId ? "Me!" : user.role}
</Text>
<Icon source="chevron-right" />
</View>
)}
onPress={() =>
router.push(`content/team/users/${userId}`)
}
/>
);
})}
</List.Section>
</KeyboardAwareScrollView>
</BottomSheetModalProvider>
{userId === currentUserId ? "Me!" : user.role}
</Text>
<Icon source="chevron-right" />
</View>
)}
onPress={() =>
router.push(`content/team/users/${userId}`)
}
/>
);
})}
</List.Section>
</KeyboardAwareScrollView>
</>
</TouchableWithoutFeedback>
</SafeAreaView>
Expand Down
4 changes: 3 additions & 1 deletion app/segments/drill/[id]/submission/input.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
BottomSheetBackdrop,
BottomSheetModal,
BottomSheetModalProvider,
BottomSheetScrollView,
Expand Down Expand Up @@ -624,6 +625,7 @@ export default function Input({ drillInfo, setToggleResult, setOutputData }) {
ref={navModalRef}
index={1}
snapPoints={snapPoints}
backdropComponent={BottomSheetBackdrop}
>
<BottomSheetScrollView>
<View style={styles.bottomSheetContentContainer}>
Expand Down Expand Up @@ -657,6 +659,7 @@ export default function Input({ drillInfo, setToggleResult, setOutputData }) {
ref={descriptionModalRef}
index={1}
snapPoints={snapPoints}
backdropComponent={BottomSheetBackdrop}
>
<BottomSheetScrollView>
<Description />
Expand Down Expand Up @@ -763,7 +766,6 @@ const styles = StyleSheet.create({
},
button: {
width: "95%",
height: 52,
backgroundColor: "#F24E1E",
marginBottom: 20,
justifyContent: "center",
Expand Down

0 comments on commit 95cc8ae

Please sign in to comment.