()
| 15 | import { useAuthContext } from '../contexts/AuthContext'; |
| 16 | |
| 17 | function FeedEmptyScreen(): ReactElement | null { |
| 18 | const router = useRouter(); |
| 19 | const { user } = useAuthContext(); |
| 20 | |
| 21 | if (!user) { |
| 22 | return null; |
| 23 | } |
| 24 | |
| 25 | return ( |
| 26 | <PageContainer className="mx-auto"> |
| 27 | <EmptyScreenContainer> |
| 28 | <Image |
| 29 | className="h-40 w-40 object-contain" |
| 30 | src={cloudinaryCharmNotEnoughTags} |
| 31 | alt="daily.dev charm holding tags" |
| 32 | loading="lazy" |
| 33 | /> |
| 34 | <EmptyScreenTitle>Your feed filters are too specific.</EmptyScreenTitle> |
| 35 | <EmptyScreenDescription> |
| 36 | We couldn't fetch enough posts based on your selected tags. Try |
| 37 | adding more tags using the feed settings. |
| 38 | </EmptyScreenDescription> |
| 39 | <EmptyScreenButton |
| 40 | onClick={() => { |
| 41 | router.push(`${webappUrl}feeds/${user.id}/edit`); |
| 42 | }} |
| 43 | size={ButtonSize.Large} |
| 44 | > |
| 45 | Feed filters |
| 46 | </EmptyScreenButton> |
| 47 | </EmptyScreenContainer> |
| 48 | </PageContainer> |
| 49 | ); |
| 50 | } |
| 51 | |
| 52 | export default FeedEmptyScreen; |
nothing calls this directly
no test coverage detected