diff --git a/App.tsx b/App.tsx index 01ab652..68db9ae 100644 --- a/App.tsx +++ b/App.tsx @@ -1,15 +1,23 @@ -import { StatusBar } from "expo-status-bar"; -import { Text, View } from "react-native"; -import { style } from "./src/util/style"; +import { StatusBar } from 'expo-status-bar'; +import { StyleSheet, Text, View } from 'react-native'; -import { PostsContainer } from "./src/components/PostsContainer"; +import { PostsContainer } from './src/components/PostsContainer'; -export default function App(): JSX.Element { +export default function App() { return ( - + Open up App.tsx to start working on your app! ); } + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: '#fff', + alignItems: 'center', + justifyContent: 'center', + }, +}); diff --git a/src/components/PostView.tsx b/src/components/PostView.tsx index 35957b5..45e8bbf 100644 --- a/src/components/PostView.tsx +++ b/src/components/PostView.tsx @@ -1,7 +1,6 @@ import React from "react"; import { View, Text } from "react-native"; import { Post } from "../util/api"; -import { style } from "../util/style"; /** * This is the component that holds a single Post @@ -15,8 +14,8 @@ export function PostView({ post }: { post: Post }): JSX.Element { const [thisPost, setThisPost] = React.useState(post); return ( - - {thisPost.content} + + {thisPost.content} ); } diff --git a/src/components/PostsContainer.tsx b/src/components/PostsContainer.tsx index a67ceb5..61bc7fa 100644 --- a/src/components/PostsContainer.tsx +++ b/src/components/PostsContainer.tsx @@ -2,7 +2,6 @@ import React from "react"; import { View, Text } from "react-native"; import { getPosts, Post } from "../util/api"; import { PostView } from "./PostView"; -import { style } from "../util/style"; export function PostsContainer(): JSX.Element { const [posts, setPosts] = React.useState([]); @@ -16,11 +15,11 @@ export function PostsContainer(): JSX.Element { }, []); return ( - + Hello World! {posts.map((post) => ( ))} ); -} \ No newline at end of file +} diff --git a/src/util/style.ts b/src/util/style.ts deleted file mode 100644 index 6fb0b72..0000000 --- a/src/util/style.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { StyleSheet } from 'react-native'; - -export const style = StyleSheet.create({ - app: { // Outermost container - flex: 1, - backgroundColor: '#fff', // For the "entire" app - alignItems: 'center', - justifyContent: 'center', - }, - postsContainer: { - height: '100%', - padding: 5, - flex: 1, - alignItems: 'center', - justifyContent: 'flex-start', - backgroundColor: '#fff', // For the container holding the posts - }, - postView: { - flexDirection: "row", - backgroundColor: '#fff', - paddingVertical: 5, - }, - postFont: { - color: "#000", - }, -}); \ No newline at end of file