feat: integrate contextual links and fix coupons navigation
- Added DocLink component and mapped routes - Fixed Coupons nav link to /marketing/coupons - Updated Settings pages to show inline documentation links
This commit is contained in:
@@ -9,6 +9,7 @@ import { NewsletterForm } from '../components/NewsletterForm';
|
||||
import { LayoutWrapper } from './LayoutWrapper';
|
||||
import { useModules } from '../hooks/useModules';
|
||||
import { useModuleSettings } from '../hooks/useModuleSettings';
|
||||
import { CouponURLHandler } from '../components/CouponURLHandler';
|
||||
|
||||
interface BaseLayoutProps {
|
||||
children: ReactNode;
|
||||
@@ -22,22 +23,20 @@ interface BaseLayoutProps {
|
||||
export function BaseLayout({ children }: BaseLayoutProps) {
|
||||
const headerSettings = useHeaderSettings();
|
||||
|
||||
// Map header styles to layouts
|
||||
// classic -> ClassicLayout, centered -> ModernLayout, minimal -> LaunchLayout, split -> BoutiqueLayout
|
||||
switch (headerSettings.style) {
|
||||
case 'classic':
|
||||
return <ClassicLayout>{children}</ClassicLayout>;
|
||||
case 'centered':
|
||||
return <ModernLayout>{children}</ModernLayout>;
|
||||
case 'minimal':
|
||||
return <LaunchLayout>{children}</LaunchLayout>;
|
||||
case 'split':
|
||||
return <BoutiqueLayout>{children}</BoutiqueLayout>;
|
||||
default:
|
||||
return <ClassicLayout>{children}</ClassicLayout>;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<CouponURLHandler />
|
||||
{/* Map header styles to layouts */}
|
||||
{headerSettings.style === 'classic' && <ClassicLayout>{children}</ClassicLayout>}
|
||||
{headerSettings.style === 'centered' && <ModernLayout>{children}</ModernLayout>}
|
||||
{headerSettings.style === 'minimal' && <LaunchLayout>{children}</LaunchLayout>}
|
||||
{headerSettings.style === 'split' && <BoutiqueLayout>{children}</BoutiqueLayout>}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
// Temporary internal switch function removed to allow fragment wrapping above.
|
||||
// Re-implementing logic directly in return for cleaner wrapping.
|
||||
/**
|
||||
* Classic Layout - Traditional ecommerce
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user