This commit is contained in:
alorig
2025-11-18 05:21:27 +05:00
parent a0f3e3a778
commit 9a6d47b91b
34 changed files with 3258 additions and 9 deletions

View File

@@ -0,0 +1,83 @@
/**
* Site Content Editor
* Phase 6: Site Integration & Multi-Destination Publishing
*/
import React, { useState, useEffect } from 'react';
import { useParams, useNavigate } from 'react-router-dom';
import PageMeta from '../../components/common/PageMeta';
import { Card } from '../../components/ui/card';
import Button from '../../components/ui/button/Button';
import { useToast } from '../../components/ui/toast/ToastContainer';
import { fetchAPI } from '../../services/api';
interface Page {
id: number;
slug: string;
title: string;
type: string;
status: string;
blocks: any[];
}
export default function SiteContentEditor() {
const { siteId } = useParams<{ siteId: string }>();
const navigate = useNavigate();
const toast = useToast();
const [pages, setPages] = useState<Page[]>([]);
const [loading, setLoading] = useState(true);
const [selectedPage, setSelectedPage] = useState<Page | null>(null);
useEffect(() => {
if (siteId) {
loadPages();
}
}, [siteId]);
const loadPages = async () => {
try {
setLoading(true);
// TODO: Load pages from SiteBlueprint API
// For now, placeholder
setPages([]);
} catch (error: any) {
toast.error(`Failed to load pages: ${error.message}`);
} finally {
setLoading(false);
}
};
if (loading) {
return (
<div className="p-6">
<PageMeta title="Site Content Editor" />
<div className="flex items-center justify-center h-64">
<div className="text-gray-500">Loading pages...</div>
</div>
</div>
);
}
return (
<div className="p-6">
<PageMeta title="Site Content Editor - IGNY8" />
<div className="mb-6">
<h1 className="text-2xl font-bold text-gray-900 dark:text-white">
Site Content Editor
</h1>
<p className="text-gray-600 dark:text-gray-400 mt-1">
Edit content for site pages
</p>
</div>
<Card className="p-6">
<div className="text-center py-12">
<p className="text-gray-600 dark:text-gray-400">
Content editor will be implemented in Phase 7
</p>
</div>
</Card>
</div>
);
}