Fix single post scrolling for long content and comments
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { View } from 'react-native';
|
||||
import { View, ScrollView } from 'react-native';
|
||||
import API from './../API.js';
|
||||
import Post from './Post.js';
|
||||
|
||||
@@ -19,8 +19,10 @@ let SinglePostComponent = ({ postId, hideComments }) => {
|
||||
}
|
||||
}, [postId]);
|
||||
return (post._id ? (
|
||||
<View>
|
||||
<Post post={post} showComments={hideComments ? false : true} />
|
||||
<View style={{ flex: 1 }}>
|
||||
<ScrollView contentContainerStyle={{ paddingBottom: 18 }}>
|
||||
<Post post={post} showComments={hideComments ? false : true} />
|
||||
</ScrollView>
|
||||
</View>
|
||||
) : null);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user