aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Widgets/RecentPosts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-02-13 19:35:21 +0100
committerArmand Philippot <git@armandphilippot.com>2022-02-13 19:35:21 +0100
commit998aac559ec75379b7fd25496ae06073c7b342c5 (patch)
tree1baf975723e2880d69f9cebac405cea84674fc56 /src/components/Widgets/RecentPosts
parentd7df049ef40d4028ac5616f8bbe366d1476404de (diff)
chore: add some noscript tags to explain why the data are not loaded
Diffstat (limited to 'src/components/Widgets/RecentPosts')
-rw-r--r--src/components/Widgets/RecentPosts/RecentPosts.tsx12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/components/Widgets/RecentPosts/RecentPosts.tsx b/src/components/Widgets/RecentPosts/RecentPosts.tsx
index 1507edf..b7957b7 100644
--- a/src/components/Widgets/RecentPosts/RecentPosts.tsx
+++ b/src/components/Widgets/RecentPosts/RecentPosts.tsx
@@ -67,7 +67,17 @@ const RecentPosts = () => {
return data.posts.map((post) => getPost(post));
};
- return <ul className={styles.list}>{getPostsItems()}</ul>;
+ return (
+ <ul className={styles.list}>
+ <noscript>
+ {intl.formatMessage({
+ defaultMessage: 'Javascript is required to load the latest posts.',
+ description: 'RecentPosts: noscript tag',
+ })}
+ </noscript>
+ {getPostsItems()}
+ </ul>
+ );
};
export default RecentPosts;