feat(core): update

This commit is contained in:
2026-06-21 20:20:20 +03:30
parent 4d995a61af
commit 58b027813d
15 changed files with 232 additions and 113 deletions

View File

@@ -1,6 +1,7 @@
import Image from 'next/image'
import bg from '../public/bg.webp'
import MG from '@/components/MG'
import { getPublicContent } from '@/lib/content'
export function RMGPSVG (){
return (
@@ -56,20 +57,9 @@ const circles = (
)
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 Hero({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') {