Fix README rendering

This commit is contained in:
Max Wofford 2024-08-19 16:00:38 -04:00
parent f4114e6a3c
commit e2f5359fab
2 changed files with 5 additions and 4 deletions

View file

@ -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) {

View file

@ -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 })