Skip to content

Commit

Permalink
fix(posts): minor bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
micahlt committed Feb 9, 2024
1 parent b10c5d7 commit 9953196
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/Feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ function Feed() {
setPage(1);
fetchMessages();
}
console.log('beforeFetch');
fetch(
`${apiURL}/users/${username}/following/posts?page=${
isInitial ? 1 : page
Expand All @@ -98,7 +97,6 @@ function Feed() {
},
)
.then(response => {
console.log('RES');
return response.json();
})
.then(json => {
Expand Down
8 changes: 5 additions & 3 deletions src/components/Post.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from 'react-native-paper';
import { useWindowDimensions } from 'react-native';
import RenderHtml from 'react-native-render-html';
import ViewShot, { captureRef } from 'react-native-view-shot';
import ViewShot from 'react-native-view-shot';
import Share from 'react-native-share';
import ago from 's-ago';
import s from '../../styles/Post.module.css';
Expand Down Expand Up @@ -97,13 +97,15 @@ const Post = React.memo(
showModal(true);
};
const handleLongPress = () => {
console.log('LONG');
viewRef.current.capture().then(
uri => {
console.log('Image saved to', uri);
Share.open({
url: uri,
message: uri,
title: 'Share this post elsewhere',
failOnCancel: false,
type: 'image/png',
filename: 'wasteof-post.png',
});
},
error => console.error('Oops, snapshot failed', error),
Expand Down

0 comments on commit 9953196

Please sign in to comment.