From 1d4df970499a3bf609337342d03492a176d55847 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Mon, 24 Jul 2023 13:48:23 +0200 Subject: [PATCH] [Glitch] Add `lang` attribute to trending links Port 76fce34ebb455d88a34290154ad8f02f582a67c0 to glitch-soc Signed-off-by: Claire --- .../flavours/glitch/features/explore/components/story.jsx | 7 ++++--- app/javascript/flavours/glitch/features/explore/links.jsx | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/javascript/flavours/glitch/features/explore/components/story.jsx b/app/javascript/flavours/glitch/features/explore/components/story.jsx index 134fa1108e..76eb207acd 100644 --- a/app/javascript/flavours/glitch/features/explore/components/story.jsx +++ b/app/javascript/flavours/glitch/features/explore/components/story.jsx @@ -14,6 +14,7 @@ export default class Story extends PureComponent { static propTypes = { url: PropTypes.string, title: PropTypes.string, + lang: PropTypes.string, publisher: PropTypes.string, sharedTimes: PropTypes.number, thumbnail: PropTypes.string, @@ -27,15 +28,15 @@ export default class Story extends PureComponent { handleImageLoad = () => this.setState({ thumbnailLoaded: true }); render () { - const { url, title, publisher, sharedTimes, thumbnail, blurhash } = this.props; + const { url, title, lang, publisher, sharedTimes, thumbnail, blurhash } = this.props; const { thumbnailLoaded } = this.state; return (
-
{publisher ? publisher : }
-
{title ? title : }
+
{publisher ? publisher : }
+
{title ? title : }
{typeof sharedTimes === 'number' ? : }
diff --git a/app/javascript/flavours/glitch/features/explore/links.jsx b/app/javascript/flavours/glitch/features/explore/links.jsx index 91a93935d1..8d360427d5 100644 --- a/app/javascript/flavours/glitch/features/explore/links.jsx +++ b/app/javascript/flavours/glitch/features/explore/links.jsx @@ -58,6 +58,7 @@ class Links extends PureComponent { {isLoading ? () : links.map(link => (