images fix
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client'
|
||||
import { useState } from 'react'
|
||||
import React, { useState } from 'react'
|
||||
|
||||
interface ShowMoreProps {
|
||||
text?: string
|
||||
|
||||
Reference in New Issue
Block a user