images fix

This commit is contained in:
2025-05-16 12:02:36 +03:00
parent 8d7be8f829
commit 9cf83b9710
7 changed files with 49 additions and 16 deletions

View File

@@ -20,7 +20,12 @@ const News: React.FC<NewsProps> = ({ news }) => {
<div className="flex flex-col bg-white rounded-2xl shadow-md overflow-hidden hover:shadow-2xl transition-shadow duration-500 p-6">
<div className="relative h-[200px]">
<Image
src={item.image}
src={
item.titleImage.startsWith('http')
? item.titleImage
: `http://127.0.0.1:8000${item.titleImage}` ||
'/placeholder-image.jpg'
}
alt={item.title}
fill
className="object-cover rounded-2xl"

View File

@@ -1,5 +1,5 @@
'use client'
import { useState } from 'react'
import React, { useState } from 'react'
interface ShowMoreProps {
text?: string