Skip to content
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
36 changes: 15 additions & 21 deletions shatter-mobile/app/(tabs)/ProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { SvgUri } from "react-native-svg";
import { useAuth } from "../../src/components/context/AuthContext";
import AnimatedTab from "../../src/components/general/AnimatedTab";
import { ProfilePageStyling as styles } from "../../src/styling/ProfilePage.styles";
import { LinkRow } from "@/src/components/general/LinkRow";

export default function Profile() {
const { user, logout } = useAuth();
Expand Down Expand Up @@ -70,30 +71,23 @@ export default function Profile() {
</Text>
)}

{/* LinkedIn */}
{social?.linkedin && (
<View style={styles.linkContainer}>
<Text style={styles.linkLabel}>LinkedIn</Text>
<Text style={styles.linkUrl}>{social.linkedin}</Text>
</View>
)}

{/* GitHub */}
{social?.github && (
<View style={styles.linkContainer}>
<Text style={styles.linkLabel}>GitHub</Text>
<Text style={styles.linkUrl}>{social.github}</Text>
{/* Social Links */}
{user.socialLinks && (
<View>
{social?.linkedin && (
<LinkRow label="LinkedIn" url={social.linkedin} />
)}

{social?.github && (
<LinkRow label="GitHub" url={social.github} />
)}

{social?.other?.map((link, index) => (
<LinkRow key={index} label={link.label} url={link.url} />
))}
</View>
)}

{/* Other Links */}
{social?.other?.map((link, index) => (
<View key={index} style={styles.linkContainer}>
<Text style={styles.linkLabel}>{link.label}</Text>
<Text style={styles.linkUrl}>{link.url}</Text>
</View>
))}

<TouchableOpacity
style={styles.editButton}
onPress={() => router.push("/UserPages/UpdateProfile")}
Expand Down
2 changes: 0 additions & 2 deletions shatter-mobile/src/components/games/IcebreakerGame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import { useAuth } from "../context/AuthContext";
import { useGame } from "../context/GameContext";
import NameBingo from "./NameBingo";

const POLL_INTERVAL = 4000; //4 seconds

type IcebreakerGameProps = {
event: EventIB;
};
Expand Down
72 changes: 36 additions & 36 deletions shatter-mobile/src/components/games/NameBingo.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import { useGame } from "@/src/components/context/GameContext";
import { EventState, Participant } from "@/src/interfaces/Event";
import { BingoTile } from "@/src/interfaces/Game";
import {
getBingoCategories,
getParticipantsByEventId,
} from "@/src/services/game.service";
import { getBingoCategories } from "@/src/services/game.service";
import AsyncStorage from "@react-native-async-storage/async-storage";
import { useEffect, useState } from "react";
import {
DimensionValue,
ScrollView,
Text,
TextInput,
TouchableOpacity,
View,
DimensionValue,
ScrollView,
Text,
TextInput,
TouchableOpacity,
View,
} from "react-native";
import { NameBingoStyling as styles } from "../../styling/NameBingo.styles";
import FullPageLoader from "../general/FullPageLoader";
Expand Down Expand Up @@ -267,34 +264,37 @@ const NameBingo = ({ eventId, onConnect }: NameBingoProps) => {
)}

{/* Hint */}
{!selectedCardId && gameState.progress !== EventState.COMPLETED && (
<Text style={styles.selectCardHint}>Select a square first</Text>
)}
{!selectedCardId &&
gameState.progress !== EventState.COMPLETED &&
!gameState.viewingGame && (
<Text style={styles.selectCardHint}>Select a square first</Text>
)}

{/* Search */}
{gameState.progress !== EventState.COMPLETED && (
<View style={styles.searchContainer}>
<TextInput
style={styles.inputFlex}
placeholder="Who did you find?"
value={search}
onChangeText={setSearch}
/>
{search.length > 0 && filteredParticipants.length > 0 && (
<ScrollView style={styles.dropdown}>
{filteredParticipants.map((p) => (
<TouchableOpacity
key={p._id}
style={styles.dropdownItem}
onPress={() => handleAssign(p)}
>
<Text>{p.name}</Text>
</TouchableOpacity>
))}
</ScrollView>
)}
</View>
)}
{gameState.progress !== EventState.COMPLETED &&
!gameState.viewingGame && (
<View style={styles.searchContainer}>
<TextInput
style={styles.inputFlex}
placeholder="Who did you find?"
value={search}
onChangeText={setSearch}
/>
{search.length > 0 && filteredParticipants.length > 0 && (
<ScrollView style={styles.dropdown}>
{filteredParticipants.map((p) => (
<TouchableOpacity
key={p._id}
style={styles.dropdownItem}
onPress={() => handleAssign(p)}
>
<Text>{p.name}</Text>
</TouchableOpacity>
))}
</ScrollView>
)}
</View>
)}

{/* Card Grid */}
<View style={{ padding: 12 }}>
Expand Down
Loading