Files
otunes/apps/mobile/app/(app)/recently-played.tsx
T
joshuafhiggins 73c7283d4d Add Expo mobile app and extract shared Convex package
- Replace mobile placeholder with Expo Router app (tabs, playback, auth, library)
- Move Convex backend to @otunes/convex for web and mobile reuse
- Update web app imports and API routes to use shared package
2026-08-02 04:14:01 +00:00

34 lines
1.2 KiB
TypeScript

import { useQuery } from "convex/react"
import { ScrollView, StyleSheet, View } from "react-native"
import { SafeAreaView } from "react-native-safe-area-context"
import { ContentCarousel } from "@/components/media-cards"
import { ScreenHeader } from "@/components/screen-header"
import { LoadingView } from "@/components/ui/primitives"
import { contentBottomInset } from "@/components/player"
import { api } from "@otunes/convex/_generated/api"
import { spacing, useThemeColors } from "@/lib/theme"
export default function RecentlyPlayedScreen() {
const colors = useThemeColors()
const recentlyPlayed = useQuery(api.library.browseRecentlyPlayed)
return (
<SafeAreaView style={[styles.safe, { backgroundColor: colors.background }]} edges={["top"]}>
<ScreenHeader title="Recently Played" />
{recentlyPlayed === undefined ? (
<LoadingView />
) : (
<ScrollView contentContainerStyle={[styles.content, { paddingBottom: contentBottomInset }]}>
<ContentCarousel title="Recently Played" content={recentlyPlayed} />
</ScrollView>
)}
</SafeAreaView>
)
}
const styles = StyleSheet.create({
safe: { flex: 1 },
content: { padding: spacing.lg },
})