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