fix: resolve homepage and tools hero inversion, remove acne references, restore centered directory heroes across all routes
This commit is contained in:
+1
-11
@@ -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',
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user