From 63710a39c5a1173e12951af28fe48266a12768d7 Mon Sep 17 00:00:00 2001 From: Doe <89263198+Flashmaxi@users.noreply.github.com> Date: Mon, 23 Dec 2024 10:22:33 +0100 Subject: [PATCH] feat(resources): add flag to resources --- .../$newsletterName-$newsletterId.tsx | 33 ++++++++++++++----- .../podcasts/$podcastName-$podcastId.tsx | 32 +++++++++++++----- 2 files changed, 47 insertions(+), 18 deletions(-) diff --git a/apps/web/src/routes/_content/resources/newsletters/$newsletterName-$newsletterId.tsx b/apps/web/src/routes/_content/resources/newsletters/$newsletterName-$newsletterId.tsx index 5a8335769..c554b1d32 100644 --- a/apps/web/src/routes/_content/resources/newsletters/$newsletterName-$newsletterId.tsx +++ b/apps/web/src/routes/_content/resources/newsletters/$newsletterName-$newsletterId.tsx @@ -18,6 +18,7 @@ import { import { useGreater } from '#src/hooks/use-greater.js'; import { useNavigateMisc } from '#src/hooks/use-navigate-misc.ts'; import { BackLink } from '#src/molecules/backlink.js'; +import Flag from '#src/molecules/Flag/index.tsx'; import { assetUrl } from '#src/utils/index.js'; import { useShuffleSuggestedContent } from '#src/utils/resources-hook.ts'; import { formatNameForURL } from '#src/utils/string.ts'; @@ -148,11 +149,19 @@ function NewsletterDetail() { >
- {newsletter.title} +
+ {newsletter.title} + +
+
{newsletter?.websiteUrl && ( @@ -169,10 +178,16 @@ function NewsletterDetail() {
-

- {newsletter.title} -

- +
+

+ {newsletter.title} +

+ +

{t('resources.newsletters.author')} diff --git a/apps/web/src/routes/_content/resources/podcasts/$podcastName-$podcastId.tsx b/apps/web/src/routes/_content/resources/podcasts/$podcastName-$podcastId.tsx index 66eb9900b..f375af6b8 100644 --- a/apps/web/src/routes/_content/resources/podcasts/$podcastName-$podcastId.tsx +++ b/apps/web/src/routes/_content/resources/podcasts/$podcastName-$podcastId.tsx @@ -18,6 +18,7 @@ import { import { useGreater } from '#src/hooks/use-greater.js'; import { useNavigateMisc } from '#src/hooks/use-navigate-misc.ts'; import { BackLink } from '#src/molecules/backlink.tsx'; +import Flag from '#src/molecules/Flag/index.tsx'; import { assetUrl, trpc } from '#src/utils/index.ts'; import { useShuffleSuggestedContent } from '#src/utils/resources-hook.ts'; import { formatNameForURL } from '#src/utils/string.ts'; @@ -125,11 +126,18 @@ function Podcast() { >

- {t('imagesAlt.bookCover')} +
+ {t('imagesAlt.bookCover')} + +
{podcast?.podcastUrl && ( @@ -147,10 +155,16 @@ function Podcast() {
-

- {podcast?.name} -

- +
+

+ {podcast?.name} +

+ +
{podcast?.tags.map((tag, i) => (