Skip to content

Commit

Permalink
feat: create preview action
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-h1 committed Dec 16, 2023
1 parent 2207844 commit 59b8333
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 36 deletions.
7 changes: 6 additions & 1 deletion src/components/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ interface Props {
color?: string;
}

const Heading = ({ children, fontSize = 30, paddingBottom = 20, color = colors.black }: Props) => {
const Heading = ({
children,
fontSize = 30,
paddingBottom = 20,
color = colors.black,
}: Props) => {
return (
<View style={styles.container}>
<Text style={[{ fontSize, paddingBottom, color }]}>{children}</Text>
Expand Down
7 changes: 1 addition & 6 deletions src/components/StreamListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { NavigationProp, useNavigation } from '@react-navigation/native';
import { useEffect, useState } from 'react';
import {
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { RootRoutes } from '../navigation/RootStack';
import {
StreamRoutes,
Expand Down
46 changes: 25 additions & 21 deletions src/components/Tags.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { FlatList, StyleSheet, Text , View } from "react-native";
import colors from "../styles/colors";

import { FlatList, StyleSheet, Text, View } from 'react-native';
import colors from '../styles/colors';

interface Props {
tags: string[];
Expand All @@ -10,23 +9,28 @@ interface Props {

const Tags = ({ tags, marginTop = 13, marginBottom }: Props) => {
return (
<View style={[styles.tagRow, {
marginTop,
marginBottom,
}]}>
<FlatList
data={tags}
renderItem={({ item }) => (
<View style={styles.tag}>
<Text style={styles.tagText}>{item}</Text>
</View>
)}
keyExtractor={item => item}
horizontal
/>
</View>
)
}
<View
style={[
styles.tagRow,
{
marginTop,
marginBottom,
},
]}
>
<FlatList
data={tags}
renderItem={({ item }) => (
<View style={styles.tag}>
<Text style={styles.tagText}>{item}</Text>
</View>
)}
keyExtractor={item => item}
horizontal
/>
</View>
);
};
export default Tags;

const styles = StyleSheet.create({
Expand All @@ -44,4 +48,4 @@ const styles = StyleSheet.create({
color: colors.black,
fontSize: 13,
},
});
});
12 changes: 4 additions & 8 deletions src/screens/Stream/LiveStreamScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
/* eslint-disable no-console */
/* eslint-disable @typescript-eslint/no-unused-vars */
// eslint-disable
import { AntDesign } from '@expo/vector-icons';
import { RouteProp, useRoute } from '@react-navigation/native';
import { Video, ResizeMode, AVPlaybackStatus } from 'expo-av';
import { useEffect, useRef, useState } from 'react';
import {
Dimensions,
SafeAreaView,
StyleSheet,
Text,
View,
} from 'react-native';
import { Dimensions, SafeAreaView, StyleSheet, Text, View } from 'react-native';
import Heading from '../../components/Heading';
import Image from '../../components/Image';
import Tags from '../../components/Tags';
Expand Down Expand Up @@ -60,7 +57,6 @@ const LiveStreamScreen = ({
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [liveStream]);


return (
<SafeAreaView style={styles.wrapper}>
<Video
Expand Down

0 comments on commit 59b8333

Please sign in to comment.