mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-15 16:42:10 +03:00
added redundency to posts cache primer
This commit is contained in:
parent
2e05c37623
commit
3954a9366a
@ -42,6 +42,11 @@ export const usePostsCachePrimer = () => {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const cachePost = async (post) => {
|
||||
|
||||
if(!post || !post.author || !post.permlink || !post.body){
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('priming data', post.author, post.permlink, post);
|
||||
post.body = renderPostBody({ ...post, last_update: post.updated }, true, Platform.OS !== 'ios');
|
||||
queryClient.setQueryData([QUERIES.POST.GET, post.author, post.permlink], post);
|
||||
|
Loading…
Reference in New Issue
Block a user