feat: add NSFW tag in mod details page
This commit is contained in:
parent
0e14336e8b
commit
7b9c95c863
@ -111,6 +111,7 @@ export const InnerModPage = () => {
|
|||||||
body={modData.body}
|
body={modData.body}
|
||||||
screenshotsUrls={modData.screenshotsUrls}
|
screenshotsUrls={modData.screenshotsUrls}
|
||||||
tags={modData.tags}
|
tags={modData.tags}
|
||||||
|
nsfw={modData.nsfw}
|
||||||
/>
|
/>
|
||||||
<Interactions />
|
<Interactions />
|
||||||
<PublishDetails
|
<PublishDetails
|
||||||
@ -318,6 +319,7 @@ type BodyProps = {
|
|||||||
body: string
|
body: string
|
||||||
screenshotsUrls: string[]
|
screenshotsUrls: string[]
|
||||||
tags: string[]
|
tags: string[]
|
||||||
|
nsfw: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const Body = ({
|
const Body = ({
|
||||||
@ -325,7 +327,8 @@ const Body = ({
|
|||||||
title,
|
title,
|
||||||
body,
|
body,
|
||||||
screenshotsUrls,
|
screenshotsUrls,
|
||||||
tags
|
tags,
|
||||||
|
nsfw
|
||||||
}: BodyProps) => {
|
}: BodyProps) => {
|
||||||
const postBodyRef = useRef<HTMLDivElement>(null)
|
const postBodyRef = useRef<HTMLDivElement>(null)
|
||||||
const viewFullPostBtnRef = useRef<HTMLDivElement>(null)
|
const viewFullPostBtnRef = useRef<HTMLDivElement>(null)
|
||||||
@ -376,6 +379,12 @@ const Body = ({
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className='IBMSMSMBSSTags'>
|
<div className='IBMSMSMBSSTags'>
|
||||||
|
{nsfw && (
|
||||||
|
<div className='IBMSMSMBSSTagsTag IBMSMSMBSSTagsTagNSFW'>
|
||||||
|
<p>NSFW</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{tags.map((tag, index) => (
|
{tags.map((tag, index) => (
|
||||||
<a className='IBMSMSMBSSTagsTag' href='#' key={`tag-${index}`}>
|
<a className='IBMSMSMBSSTagsTag' href='#' key={`tag-${index}`}>
|
||||||
{tag}
|
{tag}
|
||||||
|
@ -103,3 +103,7 @@
|
|||||||
max-width: 28px;
|
max-width: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.IBMSMSMBSSTagsTag.IBMSMSMBSSTagsTagNSFW:hover {
|
||||||
|
border: unset;
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
@ -34,3 +34,12 @@
|
|||||||
transform: scale(0.98);
|
transform: scale(0.98);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.IBMSMSMBSSTagsTag.IBMSMSMBSSTagsTagNSFW {
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
color: rgb(225, 68, 68);
|
||||||
|
font-weight: bold;
|
||||||
|
border: unset;
|
||||||
|
font-size: 14px;
|
||||||
|
cursor: default;
|
||||||
|
box-shadow: unset;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user