Pre luanch plan phase 1 complete

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-05 03:40:39 +00:00
parent 1f2e734ea2
commit e93ea77c2b
60 changed files with 492 additions and 5215 deletions

View File

@@ -4,12 +4,13 @@ import { useToast } from '../../components/ui/toast/ToastContainer';
import { fetchSeedKeywords, SeedKeyword, fetchIndustries, Industry } from '../../services/api';
import { Card } from '../../components/ui/card';
import Badge from '../../components/ui/badge/Badge';
import { usePageLoading } from '../../context/PageLoadingContext';
export default function SeedKeywords() {
const toast = useToast();
const { startLoading, stopLoading } = usePageLoading();
const [keywords, setKeywords] = useState<SeedKeyword[]>([]);
const [industries, setIndustries] = useState<Industry[]>([]);
const [loading, setLoading] = useState(true);
const [selectedIndustry, setSelectedIndustry] = useState<number | null>(null);
const [searchTerm, setSearchTerm] = useState('');
@@ -29,7 +30,7 @@ export default function SeedKeywords() {
const loadKeywords = async () => {
try {
setLoading(true);
startLoading('Loading seed keywords...');
const response = await fetchSeedKeywords({
industry: selectedIndustry || undefined,
search: searchTerm || undefined,
@@ -38,12 +39,12 @@ export default function SeedKeywords() {
} catch (error: any) {
toast.error(`Failed to load seed keywords: ${error.message}`);
} finally {
setLoading(false);
stopLoading();
}
};
return (
<div className="p-6">
<>
<PageMeta title="Seed Keywords" />
<div className="mb-6">
<h1 className="text-2xl font-bold text-gray-900 dark:text-white">Seed Keywords</h1>
@@ -72,32 +73,27 @@ export default function SeedKeywords() {
/>
</div>
{loading ? (
<div className="flex items-center justify-center h-64">
<div className="text-gray-500">Loading...</div>
</div>
) : (
<Card className="p-6">
<div className="overflow-x-auto">
<table className="w-full">
<thead>
<tr className="border-b border-gray-200 dark:border-gray-700">
<th className="text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300">Keyword</th>
<th className="text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300">Industry</th>
<th className="text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300">Sector</th>
<th className="text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300">Volume</th>
<th className="text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300">Difficulty</th>
<th className="text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300">Country</th>
</tr>
</thead>
<tbody>
{keywords.map((keyword) => (
<tr key={keyword.id} className="border-b border-gray-100 dark:border-gray-800">
<td className="py-3 px-4 text-sm font-medium text-gray-900 dark:text-white">
{keyword.keyword}
</td>
<td className="py-3 px-4 text-sm text-gray-600 dark:text-gray-400">
{keyword.industry_name}
<Card className="p-6">
<div className="overflow-x-auto">
<table className="w-full">
<thead>
<tr className="border-b border-gray-200 dark:border-gray-700">
<th className="text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300">Keyword</th>
<th className="text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300">Industry</th>
<th className="text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300">Sector</th>
<th className="text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300">Volume</th>
<th className="text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300">Difficulty</th>
<th className="text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300">Country</th>
</tr>
</thead>
<tbody>
{keywords.map((keyword) => (
<tr key={keyword.id} className="border-b border-gray-100 dark:border-gray-800">
<td className="py-3 px-4 text-sm font-medium text-gray-900 dark:text-white">
{keyword.keyword}
</td>
<td className="py-3 px-4 text-sm text-gray-600 dark:text-gray-400">
{keyword.industry_name}
</td>
<td className="py-3 px-4 text-sm text-gray-600 dark:text-gray-400">
{keyword.sector_name}
@@ -118,7 +114,7 @@ export default function SeedKeywords() {
</div>
</Card>
)}
</div>
</>
);
}