Skip to content

Commit

Permalink
chore: run prettier formatting and npm i
Browse files Browse the repository at this point in the history
  • Loading branch information
artkolpakov committed Apr 10, 2024
1 parent d06d8f2 commit 3fbf7e4
Show file tree
Hide file tree
Showing 6 changed files with 23,734 additions and 2,073 deletions.
34 changes: 20 additions & 14 deletions app/content/profile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import { doc, updateDoc } from "firebase/firestore";
import { useEffect, useRef, useState } from "react";
import {
Image,
Keyboard,
Pressable,
ScrollView,
StyleSheet,
Text,
Keyboard,
TextInput,
TouchableOpacity,
View,
Expand Down Expand Up @@ -106,16 +106,22 @@ function Index(props) {
}, [passwordInputVisible]);

useEffect(() => {
const keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', () => {
passwordInputVisible ? setSnapPoints(["93%"]) : setSnapPoints(["83%"]);
setIsTyping(true);
});

const keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', () => {
setSnapPoints([passwordInputVisible ? "70%" : "57%"]);
setIsTyping(false);
});

const keyboardDidShowListener = Keyboard.addListener(
"keyboardDidShow",
() => {
passwordInputVisible ? setSnapPoints(["93%"]) : setSnapPoints(["83%"]);
setIsTyping(true);
},
);

const keyboardDidHideListener = Keyboard.addListener(
"keyboardDidHide",
() => {
setSnapPoints([passwordInputVisible ? "70%" : "57%"]);
setIsTyping(false);
},
);

return () => {
keyboardDidShowListener.remove();
keyboardDidHideListener.remove();
Expand Down Expand Up @@ -441,11 +447,11 @@ const styles = StyleSheet.create({
alignItems: "center",
},
emailContainer: {
alignItems: 'center',
marginBottom: 15
alignItems: "center",
marginBottom: 15,
},
emailText: {
color: 'gray',
color: "gray",
fontSize: 14, // Adjust as needed
},
input: {
Expand Down
11 changes: 9 additions & 2 deletions app/content/team/users/[user]/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,20 @@ function Index(props) {
isLoading: drillInfoIsLoading,
} = useDrillInfo();

if (userIsLoading || userEmailIsLoading || drillInfoIsLoading || attemptsIsLoading) {
if (
userIsLoading ||
userEmailIsLoading ||
drillInfoIsLoading ||
attemptsIsLoading
) {
return <Loading />;
}

if (userError || userEmailError || drillInfoError || attemptsError) {
return (
<ErrorComponent message={[userError, userEmailError, drillInfoError, attemptsError]} />
<ErrorComponent
message={[userError, userEmailError, drillInfoError, attemptsError]}
/>
);
}

Expand Down
2 changes: 1 addition & 1 deletion components/barChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default function BarChartScreen({ drillData, drillInfo }) {
width: 35,
bottom: 0,
left: 0,
height: chartHeight * 1.10,
height: chartHeight * 1.1,
zIndex: 5,
backgroundColor: "#F4F4F4", // Set background color
paddingHorizontal: 5, // Add padding
Expand Down
2 changes: 1 addition & 1 deletion components/profileCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function ProfileCard(props) {
<View style={styles.container}>
<Image source={{ uri: props.user["pfp"] }} style={styles.profileImage} />
<Text style={styles.name}>{props.user["name"]}</Text>
<Text style={styles.email}>{ props.email }</Text>
<Text style={styles.email}>{props.email}</Text>
</View>
);
}
Expand Down
Loading

0 comments on commit 3fbf7e4

Please sign in to comment.