From eeaee05ae777655d7571fbbfc9f57b174fe927e8 Mon Sep 17 00:00:00 2001
From: robo <30987265+Robonau@users.noreply.github.com>
Date: Sun, 13 Mar 2022 08:06:18 +0000
Subject: [PATCH] 18+ tag on source/extension cards (#160)
* 18+ to source card
* 18+ extensions card
---
src/components/ExtensionCard.tsx | 7 ++++++-
src/components/SourceCard.tsx | 7 ++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/components/ExtensionCard.tsx b/src/components/ExtensionCard.tsx
index dd010ce5..2c7160cb 100644
--- a/src/components/ExtensionCard.tsx
+++ b/src/components/ExtensionCard.tsx
@@ -23,7 +23,7 @@ interface IProps {
export default function ExtensionCard(props: IProps) {
const {
extension: {
- name, lang, versionName, installed, hasUpdate, obsolete, pkgName, iconUrl,
+ name, lang, versionName, installed, hasUpdate, obsolete, pkgName, iconUrl, isNsfw,
},
notifyInstall,
} = props;
@@ -116,6 +116,11 @@ export default function ExtensionCard(props: IProps) {
{langPress}
{' '}
{versionName}
+ {isNsfw && (
+
+ {' 18+'}
+
+ )}
diff --git a/src/components/SourceCard.tsx b/src/components/SourceCard.tsx
index 6237ab14..628b442e 100644
--- a/src/components/SourceCard.tsx
+++ b/src/components/SourceCard.tsx
@@ -41,7 +41,7 @@ interface IProps {
export default function SourceCard(props: IProps) {
const {
source: {
- id, name, lang, iconUrl, supportsLatest,
+ id, name, lang, iconUrl, supportsLatest, isNsfw,
},
} = props;
@@ -99,6 +99,11 @@ export default function SourceCard(props: IProps) {
{id !== '0' && (
{langCodeToName(lang)}
+ {isNsfw && (
+
+ {' 18+'}
+
+ )}
)}