diff --git a/app/blog/[identifier]/index.tsx b/app/blog/[identifier]/index.tsx index d3aa574..1281ed6 100644 --- a/app/blog/[identifier]/index.tsx +++ b/app/blog/[identifier]/index.tsx @@ -7,12 +7,33 @@ import { Profile, resolveProfile } from "@/src/lib/profile"; import { fetchBlogPosts } from "@/src/lib/query/feed"; import { useLocalSearchParams } from "expo-router"; import { useContext, useEffect, useState } from "react"; -import { ScrollView, View } from "react-native"; +import { Dimensions, ScrollView, StyleSheet, useWindowDimensions, View } from "react-native"; + +const styles = StyleSheet.create({ + postScroller: { + flexGrow: 1, + padding: 5, + paddingTop: 30, + gap: 10, + }, + postScrollerFullWidth: { + width: "100%", + }, + postScrollerSlim: { + width: 600, + borderColor: "#414141", + borderLeftWidth: 1, + borderRightWidth: 1, + }, +}); export default function BlogPage() { const [loading, setLoading] = useState(true); const [threads, setThreads] = useState(); const [profile, setProfile] = useState(); + const windowDimensions = useWindowDimensions(); + + const smallScreen = windowDimensions.width < 700 const { identifier: blogId } = useLocalSearchParams<{ identifier?: string; @@ -26,25 +47,20 @@ export default function BlogPage() { const profile = await resolveProfile(blogId!); setProfile(profile); const fetchedThreads = await fetchBlogPosts(profile, authCtx); - console.log(fetchedThreads) + console.log(fetchedThreads); setThreads(fetchedThreads); setLoading(false); })(); }, [authCtx, blogId]); + return ( {loading && } {!loading && threads && threads.length === 0 && (