(post: Post)
| 1356 | (post?.scout?.id && post?.scout?.id === userId); |
| 1357 | |
| 1358 | export const useCanBoostPost = (post: Post) => { |
| 1359 | const { user } = useAuthContext(); |
| 1360 | const canBuy = useCanPurchaseCores(); |
| 1361 | |
| 1362 | if (!user?.id) { |
| 1363 | return { canBoost: false }; |
| 1364 | } |
| 1365 | |
| 1366 | const canBoost = |
| 1367 | canBuy && checkCanBoostByUser(post, user.id) && !post?.private; |
| 1368 | |
| 1369 | return { canBoost }; |
| 1370 | }; |
| 1371 | |
| 1372 | export const BRIEFING_POSTS_PER_PAGE_DEFAULT = 20; |
| 1373 |
no test coverage detected