frontend updates and fixes

This commit is contained in:
Kalidou Diagne
2024-10-21 00:44:12 +01:00
parent 0e69a9d55f
commit a398e75c54
452 changed files with 960 additions and 1994 deletions

View File

@@ -1,25 +0,0 @@
import { useEffect, useState } from "react"
/**
* @dev This hook is used as helper to fetch content from the server
* @returns
*/
export default function useContent({ lang, id }: any) {
const [projectContent, setProjectContent] = useState<any>(null)
useEffect(() => {
const fetchContent = async () => {
const [content] = await Promise.all([
fetch(
`https://raw.githubusercontent.com/privacy-scaling-explorations/pse.dev/main/app/i18n/locales/${lang}/projects/${id}.json`
).then((res) => res.json()),
])
setProjectContent(content)
}
fetchContent()
}, [])
return {
projectContent,
}
}