mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-19 11:21:41 +03:00
removed useless code form upvote view
This commit is contained in:
parent
c7f8c3a9a3
commit
092d7d49eb
@ -46,7 +46,7 @@ const PostDisplayView = ({
|
||||
const [isLoadedComments, setIsLoadedComments] = useState(false);
|
||||
const actionSheet = useRef(null);
|
||||
const [refreshing, setRefreshing] = useState(false);
|
||||
const [activeVotesCount, setActiveVotesCount] = useState(activeVotes.length || 0)
|
||||
const [activeVotesCount, setActiveVotesCount] = useState(activeVotes.length || 0);
|
||||
|
||||
// Component Life Cycles
|
||||
useEffect(() => {
|
||||
@ -79,9 +79,9 @@ const PostDisplayView = ({
|
||||
}
|
||||
};
|
||||
|
||||
const _handleIncrementActiveVotesCount = () =>{
|
||||
const _handleIncrementActiveVotesCount = () => {
|
||||
setActiveVotesCount(activeVotesCount + 1);
|
||||
}
|
||||
};
|
||||
|
||||
const _getTabBar = (isFixedFooter = false) => {
|
||||
return (
|
||||
|
@ -73,7 +73,6 @@ class UpvoteView extends Component {
|
||||
pinCode,
|
||||
intl,
|
||||
dispatch,
|
||||
fetchPost,
|
||||
onVote,
|
||||
} = this.props;
|
||||
const { sliderValue, downvote, amount } = this.state;
|
||||
@ -100,14 +99,7 @@ class UpvoteView extends Component {
|
||||
isVoting: false,
|
||||
},
|
||||
() => {
|
||||
//add snippet to update amount and active vote count
|
||||
|
||||
onVote(amount, false);
|
||||
|
||||
if (fetchPost) {
|
||||
console.log('fetching post');
|
||||
fetchPost();
|
||||
}
|
||||
},
|
||||
);
|
||||
})
|
||||
@ -171,7 +163,6 @@ class UpvoteView extends Component {
|
||||
handleSetUpvotePercent,
|
||||
permlink,
|
||||
pinCode,
|
||||
fetchPost,
|
||||
onVote,
|
||||
} = this.props;
|
||||
const { sliderValue, downvote, amount } = this.state;
|
||||
@ -199,11 +190,6 @@ class UpvoteView extends Component {
|
||||
},
|
||||
() => {
|
||||
onVote(amount, true);
|
||||
|
||||
if (fetchPost) {
|
||||
console.log('Fetching post');
|
||||
fetchPost();
|
||||
}
|
||||
},
|
||||
);
|
||||
})
|
||||
|
@ -417,7 +417,7 @@ export const getSCAccessToken = (code) =>
|
||||
|
||||
export const getPromotePosts = () => {
|
||||
try {
|
||||
console.log("Fetching promoted posts")
|
||||
console.log('Fetching promoted posts');
|
||||
return api.get('/promoted-posts?limit=10').then((resp) => resp.data);
|
||||
} catch (error) {
|
||||
return error;
|
||||
|
Loading…
Reference in New Issue
Block a user