feat(core): update
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import Crown from '@/components/Crown'
|
||||
import { getPublicContent } from '@/lib/content'
|
||||
|
||||
export function RMGPSVG (){
|
||||
return (
|
||||
@@ -21,19 +22,8 @@ export function RMGPSVG (){
|
||||
)
|
||||
}
|
||||
|
||||
async function getData(id) {
|
||||
const res = await fetch(`${process.env.NEXT_PUBLIC_API_BASE_URL}/api/public/content/index/${id}`)
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Failed to fetch data')
|
||||
}
|
||||
|
||||
return res.json()
|
||||
}
|
||||
|
||||
|
||||
export default async function Footer({ lang }){
|
||||
const data = await getData(lang === 'fa' ? 1 : 2);
|
||||
const data = await getPublicContent(lang);
|
||||
|
||||
// Add safety checks for data structure
|
||||
if (!data || typeof data !== 'object') {
|
||||
|
||||
Reference in New Issue
Block a user