updates
This commit is contained in:
@@ -607,42 +607,6 @@ const PageContentDashboard: React.FC = () => {
|
||||
{/* Home Tab */}
|
||||
{activeTab === 'home' && (
|
||||
<div className="space-y-8">
|
||||
{/* Seed Data Button */}
|
||||
<div className="bg-gradient-to-r from-purple-50 to-indigo-50 border-2 border-purple-200 rounded-xl p-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<h3 className="text-lg font-semibold text-gray-900 mb-1">Quick Start</h3>
|
||||
<p className="text-sm text-gray-600">Load pre-configured luxury content to get started quickly</p>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
if (window.confirm('This will add pre-configured luxury content to your home page. Continue?')) {
|
||||
// Merge seed data with existing data, preserving all existing fields
|
||||
const seedData = luxuryContentSeed.home;
|
||||
setHomeData((prevData) => ({
|
||||
...prevData,
|
||||
// Update luxury-related fields from seed data
|
||||
luxury_section_title: seedData.luxury_section_title,
|
||||
luxury_section_subtitle: seedData.luxury_section_subtitle,
|
||||
luxury_section_image: seedData.luxury_section_image || prevData.luxury_section_image || '',
|
||||
luxury_features: Array.isArray(seedData.luxury_features) ? [...seedData.luxury_features] : [],
|
||||
luxury_gallery: Array.isArray(seedData.luxury_gallery) ? [...seedData.luxury_gallery] : (prevData.luxury_gallery || []),
|
||||
luxury_testimonials: Array.isArray(seedData.luxury_testimonials) ? [...seedData.luxury_testimonials] : [],
|
||||
about_preview_title: seedData.about_preview_title || prevData.about_preview_title || '',
|
||||
about_preview_content: seedData.about_preview_content || prevData.about_preview_content || '',
|
||||
about_preview_image: seedData.about_preview_image || prevData.about_preview_image || '',
|
||||
}));
|
||||
toast.success('Luxury content loaded successfully! Review and save when ready.');
|
||||
}
|
||||
}}
|
||||
className="px-6 py-2 bg-gradient-to-r from-purple-500 to-indigo-500 text-white rounded-lg font-semibold hover:from-purple-600 hover:to-indigo-600 transition-all shadow-lg"
|
||||
>
|
||||
Load Seed Data
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Home Page Content Section */}
|
||||
<div className="bg-white/90 backdrop-blur-xl rounded-2xl shadow-xl border border-gray-200/50 p-8">
|
||||
<h2 className="text-3xl font-extrabold text-gray-900 mb-6">Home Page Content</h2>
|
||||
|
||||
Reference in New Issue
Block a user