(post: Post)
| 1441 | (post?.scout?.id && post?.scout?.id === userId); |
| 1442 | |
| 1443 | export const useCanBoostPost = (post: Post) => { |
| 1444 | const { user } = useAuthContext(); |
| 1445 | const canBuy = useCanPurchaseCores(); |
| 1446 | |
| 1447 | if (!user?.id) { |
| 1448 | return { canBoost: false }; |
| 1449 | } |
| 1450 | |
| 1451 | const canBoost = |
| 1452 | canBuy && |
| 1453 | checkCanBoostByUser(post, user.id) && |
| 1454 | !post?.private && |
| 1455 | post?.type !== PostType.Brief; |
| 1456 | |
| 1457 | return { canBoost }; |
| 1458 | }; |
| 1459 | |
| 1460 | export const BRIEFING_POSTS_PER_PAGE_DEFAULT = 20; |
| 1461 |
no test coverage detected