added redundency to posts cache primer

This commit is contained in:
Nouman Tahir 2023-01-10 18:32:26 +05:00
parent 2e05c37623
commit 3954a9366a

View File

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