fix: resolve homepage and tools hero inversion, remove acne references, restore centered directory heroes across all routes

This commit is contained in:
2026-11-05 11:01:09 +05:30
parent 6300cd9cc9
commit 3390175f0d
12 changed files with 75 additions and 37 deletions
+1 -11
View File
@@ -1,6 +1,5 @@
import React from 'react';
import { getPageConfig, getAllTools, getAllApps, getAllCategories, getToolById, getAppById, getSiteConfig } from '@/lib/config/loader';
import { getEndpointById } from '@/lib/catalog/loader';
import { getPageConfig, getAllTools, getAllApps, getAllCategories, getSiteConfig } from '@/lib/config/loader';
import { SectionRenderer } from '@/components/sections/SectionRenderer';
import { notFound } from 'next/navigation';
@@ -16,20 +15,11 @@ export default function HomePage() {
const categories = getAllCategories();
const siteUrl = (process.env.SITE_URL || getSiteConfig().seo.siteUrl || 'http://localhost:3000').replace(/\/$/, '');
// Find hero tool and variants
const heroTool = getToolById('face.blemish.remove') || tools[0];
const heroApp = heroTool ? getAppById(heroTool.homeApp) : null;
const endpoint = heroTool?.tryIt?.endpointRef?.id ? getEndpointById(heroTool.tryIt.endpointRef.id) : undefined;
const variants = endpoint?.variants || [];
const context = {
page,
tools,
apps,
categories,
tool: heroTool,
homeApp: heroApp,
variants,
locale: 'en',
};