mirror of
https://github.com/System-End/site.git
synced 2026-04-19 18:35:12 +00:00
Fix README rendering
This commit is contained in:
parent
f4114e6a3c
commit
e2f5359fab
2 changed files with 5 additions and 4 deletions
|
|
@ -80,11 +80,12 @@ const ProjectView = ({
|
|||
const [markdown, setMarkdown] = useState('')
|
||||
|
||||
useEffect(() => {
|
||||
console.log(readMeLink)
|
||||
const fetchMarkdown = async () => {
|
||||
const rawReadMeLink = convertToRawUrl(readMeLink)
|
||||
if (rawReadMeLink) {
|
||||
// const rawReadMeLink = convertToRawUrl(readMeLink)
|
||||
if (readMeLink) {
|
||||
try {
|
||||
const res = await fetch(rawReadMeLink)
|
||||
const res = await fetch(readMeLink)
|
||||
const text = await res.text()
|
||||
setMarkdown(text)
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ export default async function handler(req, res) {
|
|||
color: p.fields['color'] || '',
|
||||
textColor: p.fields['textColor'] || '',
|
||||
screenshot: p.fields['ScreenshotLink'] || '',
|
||||
video: p.fields['VideoLink'] || '',
|
||||
video: p.fields['Video']?.[0]?.url || p.fields['VideoLink'] || '',
|
||||
readMeLink: p.fields['ReadMeLink'] || ''
|
||||
}
|
||||
return res.status(200).json({ project: results })
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue