- {/* Column 1: Spacious, Prominent Upload Studio (lg:col-span-7 - Made Bigger!) */}
-
+ {/* Column 1: Spacious, Prominent Upload Studio (lg:col-span-7) */}
+
setMobileTab('compare')}
/>
{/* Column 2: Sleeker, Focused Neural Transformation Preview (lg:col-span-5) */}
-
diff --git a/src/components/sections/TryItWidget.tsx b/src/components/sections/TryItWidget.tsx
index a51d150..2ea7211 100644
--- a/src/components/sections/TryItWidget.tsx
+++ b/src/components/sections/TryItWidget.tsx
@@ -25,7 +25,8 @@ interface TryItWidgetProps {
variants?: VariantSpec[];
locale?: string;
className?: string;
- onSwitchToCompare?: () => void;
+ samplePresets?: Array<{ label: string; url: string; resultUrl?: string }>;
+ ctaText?: string;
}
export function TryItWidget({
@@ -34,7 +35,8 @@ export function TryItWidget({
variants = [],
locale = 'en',
className = '',
- onSwitchToCompare,
+ samplePresets,
+ ctaText,
}: TryItWidgetProps) {
const [selectedFile, setSelectedFile] = useState
(null);
const [previewUrl, setPreviewUrl] = useState(null);
@@ -48,20 +50,22 @@ export function TryItWidget({
const [isDragOver, setIsDragOver] = useState(false);
const fileInputRef = useRef(null);
- const samplePresets = [
- {
- label: 'Sample Photo',
- url: (tool as any).media?.before || '/management/pages/home/media/sample_portrait_1.jpg',
- },
- {
- label: 'Natural Studio Model',
- url: '/management/pages/home/media/sample_portrait_2.jpg',
- },
- {
- label: 'Vintage Archival Shot',
- url: '/management/pages/home/media/sample_portrait_3.jpg',
- },
- ];
+ const activePresets = samplePresets && samplePresets.length > 0
+ ? samplePresets
+ : [
+ {
+ label: 'Sample Photo',
+ url: (tool as any).media?.before || '/management/pages/home/media/sample_portrait_1.jpg',
+ },
+ {
+ label: 'Natural Studio Model',
+ url: '/management/pages/home/media/sample_portrait_2.jpg',
+ },
+ {
+ label: 'Vintage Archival Shot',
+ url: '/management/pages/home/media/sample_portrait_3.jpg',
+ },
+ ];
const handleFileChange = (file: File) => {
const maxMB = tool.tryIt?.limits?.maxMB || 12;
@@ -250,7 +254,7 @@ export function TryItWidget({
Or test instantly with a sample photo:
- {samplePresets.map((preset, idx) => (
+ {activePresets.map((preset, idx) => (
-
- {/* Mobile Link to Preview Comparison */}
- {onSwitchToCompare && (
-