Commit 2fb3d1cd authored by Dherik Jenitan Devakumar's avatar Dherik Jenitan Devakumar
Browse files

(#15) Added type checking in movietable

parent 93e645df
......@@ -29,7 +29,7 @@ const MovieTable: React.FC<MovieTableProps> = ({fetchMore}) => {
const isLoggedIn = useSelector(selectUserIsLoggedIn);
const userName = useSelector(selectUserName)
const [modalVisible, setModalVisible] = useState(false);
const [modalMovie, setModalMovie] = useState(null);
const [modalMovie, setModalMovie] = useState<searchMovies_getMoviesBySearch>();
const [fontsLoaded] = useFonts({
'Quicksand-Regular': require('../../assets/fonts/Quicksand-Regular.ttf')
......@@ -88,7 +88,7 @@ const MovieTable: React.FC<MovieTableProps> = ({fetchMore}) => {
}}
onEndReached={fetchMore}
/>
<MovieModal isModalVisible={modalVisible} setIsModalVisible={setModalVisible} movie={modalMovie}/>
{modalMovie ? <MovieModal isModalVisible={modalVisible} setIsModalVisible={setModalVisible} movie={modalMovie}/> : null}
</SafeAreaView>
)
}
......
......@@ -124,8 +124,4 @@ export const MainPage: FunctionComponent = () => {
);
};
const inlineStyles = StyleSheet.create({
containerStyle: {
}
})
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment