chore(git): merge pull request #176 from feedback-11-24 into staging
All checks were successful
Release to Staging / build_and_release (push) Successful in 54s
All checks were successful
Release to Staging / build_and_release (push) Successful in 54s
Reviewed-on: #176
This commit is contained in:
commit
73cec02ee5
@ -1,6 +1,6 @@
|
|||||||
import FsLightbox from 'fslightbox-react'
|
import FsLightbox from 'fslightbox-react'
|
||||||
import { nip19 } from 'nostr-tools'
|
import { nip19 } from 'nostr-tools'
|
||||||
import { useEffect, useMemo, useRef, useState } from 'react'
|
import { useEffect, useRef, useState } from 'react'
|
||||||
import {
|
import {
|
||||||
Link as ReactRouterLink,
|
Link as ReactRouterLink,
|
||||||
useLoaderData,
|
useLoaderData,
|
||||||
@ -37,8 +37,6 @@ import { ReportPopup } from 'components/ReportPopup'
|
|||||||
import { Spinner } from 'components/Spinner'
|
import { Spinner } from 'components/Spinner'
|
||||||
import { RouterLoadingSpinner } from 'components/LoadingSpinner'
|
import { RouterLoadingSpinner } from 'components/LoadingSpinner'
|
||||||
import { OriginalAuthor } from 'components/OriginalAuthor'
|
import { OriginalAuthor } from 'components/OriginalAuthor'
|
||||||
import DOMPurify from 'dompurify'
|
|
||||||
import TurndownService from 'turndown'
|
|
||||||
import { Viewer } from 'components/Markdown/Viewer'
|
import { Viewer } from 'components/Markdown/Viewer'
|
||||||
|
|
||||||
const MOD_REPORT_REASONS = [
|
const MOD_REPORT_REASONS = [
|
||||||
@ -451,14 +449,6 @@ const Body = ({
|
|||||||
const COLLAPSED_MAX_SIZE = 250
|
const COLLAPSED_MAX_SIZE = 250
|
||||||
const postBodyRef = useRef<HTMLDivElement>(null)
|
const postBodyRef = useRef<HTMLDivElement>(null)
|
||||||
const viewFullPostBtnRef = useRef<HTMLDivElement>(null)
|
const viewFullPostBtnRef = useRef<HTMLDivElement>(null)
|
||||||
|
|
||||||
const markdown = useMemo(() => {
|
|
||||||
const sanitized = DOMPurify.sanitize(body)
|
|
||||||
const turndown = new TurndownService()
|
|
||||||
turndown.keep(['sup', 'sub'])
|
|
||||||
return turndown.turndown(sanitized)
|
|
||||||
}, [body])
|
|
||||||
|
|
||||||
const [lightBoxController, setLightBoxController] = useState({
|
const [lightBoxController, setLightBoxController] = useState({
|
||||||
toggler: false,
|
toggler: false,
|
||||||
slide: 1
|
slide: 1
|
||||||
@ -508,7 +498,7 @@ const Body = ({
|
|||||||
padding: '10px 18px'
|
padding: '10px 18px'
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Viewer markdown={markdown} />
|
<Viewer markdown={body} />
|
||||||
<div ref={viewFullPostBtnRef} className='IBMSMSMBSSPostBodyHide'>
|
<div ref={viewFullPostBtnRef} className='IBMSMSMBSSPostBodyHide'>
|
||||||
<div className='IBMSMSMBSSPostBodyHideText'>
|
<div className='IBMSMSMBSSPostBodyHideText'>
|
||||||
<p onClick={viewFullPost}>Read Full</p>
|
<p onClick={viewFullPost}>Read Full</p>
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
background-color: mediumpurple;
|
background-color: #666;
|
||||||
border-radius: 0.4rem;
|
border-radius: 0.4rem;
|
||||||
color: var(--black);
|
color: var(--black);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
@ -92,6 +92,8 @@
|
|||||||
img {
|
img {
|
||||||
background: #232323;
|
background: #232323;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.editor {
|
.editor {
|
||||||
@ -100,10 +102,6 @@
|
|||||||
min-height: 75px;
|
min-height: 75px;
|
||||||
}
|
}
|
||||||
.viewer {
|
.viewer {
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
table {
|
table {
|
||||||
table-layout: fixed;
|
table-layout: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -144,7 +142,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.mdxeditor {
|
.mdxeditor {
|
||||||
--baseBg: rgba(255, 255, 255, 0.05);
|
--baseBg: #262626;
|
||||||
|
}
|
||||||
|
.mdxeditor-toolbar {
|
||||||
|
top: 10px;
|
||||||
|
border: 1px solid rgb(255, 255, 255, 0.1);
|
||||||
}
|
}
|
||||||
.mdxeditor,
|
.mdxeditor,
|
||||||
.mdxeditor-popup-container {
|
.mdxeditor-popup-container {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user