one more change with landing page, and it's look so cure and good. thank you!

This commit is contained in:
Flatlogic Bot 2025-04-11 15:59:18 +00:00
parent 189f45f9b0
commit fdbe0a8504
2 changed files with 22 additions and 19 deletions

View File

@ -21,15 +21,19 @@ export default function HeroSection({
const [imageHero, setImages] = useState([]);
const pexelsQueriesWebSite = image;
useEffect(() => {
useEffect(() => {
const fetchImages = async () => {
if (image && image.length > 0 && typeof image[0] === 'object' && image[0].src) {
setImages(image);
return;
}
if (design !== HeroDesigns.TEXT_CENTER) {
try {
const images = await getMultiplePexelsImages(pexelsQueriesWebSite);
const formattedImages = images.map((image) => ({
src: image.src || undefined,
photographer: image.photographer || undefined,
photographer_url: image.photographer_url || undefined,
const formattedImages = images.map((img) => ({
src: img.src || undefined,
photographer: img.photographer || undefined,
photographer_url: img.photographer_url || undefined,
}));
setImages(formattedImages);
} catch (error) {
@ -37,9 +41,8 @@ export default function HeroSection({
}
}
};
fetchImages();
}, [pexelsQueriesWebSite, design]);
}, [pexelsQueriesWebSite, design]);
let DesignComponent;

View File

@ -93,7 +93,7 @@ export default function WebSite() {
<main className={`flex-grow bg-white rounded-none `}>
<HeroSection
projectName={'Management system'}
image={[{src: 'https://images.pexels.com/photos/12345/cool-girl-project.jpg', photographer_url: 'https://www.pexels.com/photo/cool-girl', photographer: 'Cool Girl'}]}
image={[{src: 'https://images.pexels.com/photos/774909/pexels-photo-774909.jpeg', photographer_url: 'https://www.pexels.com/photo/woman-in-white-blouse-774909/', photographer: 'Pexels'}]}
mainText={`Welcome to ${projectName} - where project management feels just like home!`}
subTitle={`${projectName} empowers project managers to seamlessly oversee multiple organizations, tasks, and teams, enhancing productivity and efficiency.`}
design={HeroDesigns.IMAGE_RIGHT || ''}