Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix previous merge #87

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 0 additions & 27 deletions app/content/drill/[id]/attempts/[attempt].js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { useLocalSearchParams } from "expo-router";
import { doc, getDoc } from "firebase/firestore";
import { useEffect } from "react";
import {
ScrollView,
StyleSheet,
Expand Down Expand Up @@ -44,8 +42,6 @@ function Result() {

let dots = [];
if (
Object.keys(drillInfo).length > 0 &&
Object.keys(attempt).length > 0 &&
drillInfo["outputs"].includes("sideLanding") &&
drillInfo["outputs"].includes("carryDiff")
) {
Expand All @@ -55,29 +51,6 @@ function Result() {
]);
}

useEffect(() => {
// massive data fetching on refresh. May or may not get its data from cache
let mainOutputAttempt = "";
getDoc(doc(db, "teams", "1", "drills", drillId)).then((doc) => {
// get drill data
if (doc.exists()) {
setDrillInfo(doc.data());
console.log("got drill data", mainOutputAttempt);
} else {
// doc.data() will be undefined in this case
console.log("No such document!");
}
});
getDoc(doc(db, "teams", "1", "attempts", attemptId))
.then((doc) => {
setAttempt(doc.data());
})
.catch((error) => {
console.log("Error getting documents: ", error);
});
return () => {};
}, []);

return (
<>
<SafeAreaView style={{ flex: 1 }} edges={["right", "top", "left"]}>
Expand Down
1 change: 0 additions & 1 deletion app/content/drill/[id]/description.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export default function Description() {

if (drillInfoError) return <ErrorComponent error={error.message} />;


return (
<View
style={{ margin: 10, position: "relative", height: windowHeight - 150 }}
Expand Down
6 changes: 0 additions & 6 deletions app/content/drill/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ export default function Index() {
<PaperProvider>
<SafeAreaView>
<Appbar.Header statusBarHeight={0} style={{ backgroundColor: "FFF" }}>
<Appbar.BackAction
onPress={() => {
navigation.goBack();
}}
color={"#F24E1E"}
/>
<Appbar.Content title="Drills" />
</Appbar.Header>

Expand Down
6 changes: 0 additions & 6 deletions app/content/profile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ function Index(props) {
<PaperProvider>
<SafeAreaView style={{ flex: 1 }}>
<Appbar.Header statusBarHeight={0} style={{ backgroundColor: "FFF" }}>
<Appbar.BackAction
onPress={() => {
navigation.goBack();
}}
color={"#F24E1E"}
/>
<Appbar.Content title={"Personal Profile"} />
<Appbar.Action
icon="cog"
Expand Down
5 changes: 0 additions & 5 deletions app/content/profile/statistics.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ import { PaperProvider, Text } from "react-native-paper";
import { SafeAreaView } from "react-native-safe-area-context";
//This is for the list of drills
export default function Statistics() {
/*React.useEffect(() => {
navigation.getParent()?.setOptions({
tabBarStyle: { display: 'none' },
});
})*/
return (
<PaperProvider>
<SafeAreaView
Expand Down
17 changes: 0 additions & 17 deletions app/content/team/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Feather } from "@expo/vector-icons";
import {
BottomSheetModal,
BottomSheetModalProvider,
Expand All @@ -16,7 +15,6 @@ import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view
import {
Appbar,
Avatar,
Button,
Icon,
List,
PaperProvider,
Expand Down Expand Up @@ -87,7 +85,6 @@ function Index() {
onPress={handlePresentModalPress}
style={{ marginRight: 7 }}
/>
<Appbar.Content title={"Team"} />
</Appbar.Header>
<BottomSheetModalProvider>
<KeyboardAwareScrollView
Expand Down Expand Up @@ -120,20 +117,6 @@ function Index() {
>
OSU Golf Team
</Text>
<Button
onPress={handlePresentModalPress}
size={24}
style={{ width: 10 }}
// react native buttons and icons don't play well together: https://stackoverflow.com/a/70038112
icon={({ size, color }) => (
<Feather
name="settings"
size={24}
color="#F24E1E"
style={{ paddingBottom: 3 }}
></Feather>
)}
></Button>

<BottomSheetModal
ref={bottomSheetModalRef}
Expand Down
17 changes: 0 additions & 17 deletions components/barChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export default function BarChartScreen({ drillData, drillInfo }) {
const data = drillDataSorted.map(
(value) => value[drillInfo["mainOutputAttempt"]],
);
console.log("data", drillInfo["mainOutputAttempt"]);

const [_, setScrollPosition] = useState(0);
const [movingAvgRange, setMovingAvgRange] = useState(5);
Expand Down Expand Up @@ -132,9 +131,6 @@ export default function BarChartScreen({ drillData, drillInfo }) {
};

const styles = StyleSheet.create({
barChartComponent: {
marginTop: 13,
},
movingAvgContainer: {
flexDirection: "row",
alignItems: "center",
Expand Down Expand Up @@ -216,9 +212,6 @@ export default function BarChartScreen({ drillData, drillInfo }) {
fontSize: 13,
color: "#333", // Adjust text color
},
scrollView: {
marginBottom: 70,
},
});

return (
Expand Down Expand Up @@ -277,16 +270,6 @@ export default function BarChartScreen({ drillData, drillInfo }) {
style={{ pointerEvents: "none" }}
/>
</BarChart>
<BarChart
style={styles.barChart}
data={transparentData}
svg={{ fill }}
contentInset={{
left: halfScreenCompensation,
right: halfScreenCompensation,
}}
yAccessor={({ item }) => item.value}
></BarChart>
</View>
</ScrollView>
</View>
Expand Down
27 changes: 2 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4641,7 +4641,6 @@ define-data-property@^1.1.2:
es-define-property "^1.0.0"
es-errors "^1.3.0"
gopd "^1.0.1"
has-property-descriptors "^1.0.0"

define-lazy-prop@^2.0.0:
version "2.0.0"
Expand Down Expand Up @@ -5785,7 +5784,7 @@ has-flag@^4.0.0:
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==

has-property-descriptors@^1.0.1:
has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854"
integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==
Expand Down Expand Up @@ -7217,7 +7216,7 @@ minimalistic-assert@^1.0.0:

minimatch@9.0.3, minimatch@^9.0.1:
version "9.0.3"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825"
resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz"
integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==
dependencies:
brace-expansion "^2.0.1"
Expand All @@ -7229,13 +7228,6 @@ minimatch@^5.0.1:
dependencies:
brace-expansion "^2.0.1"

minimatch@^9.0.1:
version "9.0.3"
resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz"
integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==
dependencies:
brace-expansion "^2.0.1"

minimist@^1.2.0, minimist@^1.2.6:
version "1.2.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
Expand Down Expand Up @@ -8290,16 +8282,6 @@ range-parser@^1.2.1, range-parser@~1.2.1:
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==

raw-body@2.5.1:
version "2.5.1"
resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz"
integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==
dependencies:
bytes "3.1.2"
http-errors "2.0.0"
iconv-lite "0.4.24"
unpipe "1.0.0"

raw-body@2.5.2:
version "2.5.2"
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a"
Expand Down Expand Up @@ -8372,11 +8354,6 @@ react-is@^17.0.1:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==

react-is@^18.0.0:
version "18.2.0"
resolved "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz"
integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==

react-native-dropdown-picker@^5.4.6:
version "5.4.6"
resolved "https://registry.yarnpkg.com/react-native-dropdown-picker/-/react-native-dropdown-picker-5.4.6.tgz#3736fc468de4a295e4df8d1f65ed2eadaf9b445f"
Expand Down
Loading