Fix single post scrolling for long content and comments

This commit is contained in:
Adolfo Reyna
2026-02-24 16:36:41 -05:00
parent 53df0699a7
commit fc6f740fd2
2 changed files with 15 additions and 12 deletions

View File

@@ -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);
};