Refactor Dropdown Handlers and Update WordPress Integration
- Updated dropdown onChange handlers across multiple components to use direct value passing instead of event target value for improved clarity and consistency. - Changed `url` to `site_url` in WordPress integration configuration for better semantic clarity. - Enhanced Vite configuration to include `fast-deep-equal` for compatibility with `react-dnd`. - Updated navigation paths in `SiteContentEditor` and `SiteList` for consistency with new routing structure.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { PlusIcon, EditIcon, SettingsIcon, EyeIcon, TrashIcon, FilterIcon, SearchIcon, PlugIcon, FileTextIcon } from 'lucide-react';
|
||||
import { PlusIcon, EditIcon, SettingsIcon, EyeIcon, TrashIcon, FilterIcon, SearchIcon, PlugIcon, FileTextIcon, MoreVerticalIcon, Building2Icon } from 'lucide-react';
|
||||
import PageMeta from '../../components/common/PageMeta';
|
||||
import { Card } from '../../components/ui/card';
|
||||
import Button from '../../components/ui/button/Button';
|
||||
@@ -515,10 +515,6 @@ export default function SiteList() {
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
<Button onClick={() => navigate('/sites/manage')} variant="outline">
|
||||
<SettingsIcon className="w-4 h-4 mr-2" />
|
||||
Site Management
|
||||
</Button>
|
||||
<Button onClick={() => navigate('/sites/builder')} variant="outline">
|
||||
<PlusIcon className="w-4 h-4 mr-2" />
|
||||
Create with Builder
|
||||
@@ -583,7 +579,7 @@ export default function SiteList() {
|
||||
<SelectDropdown
|
||||
options={SITE_TYPES}
|
||||
value={siteTypeFilter}
|
||||
onChange={(e) => setSiteTypeFilter(e.target.value)}
|
||||
onChange={(value) => setSiteTypeFilter(value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -595,7 +591,7 @@ export default function SiteList() {
|
||||
<SelectDropdown
|
||||
options={HOSTING_TYPES}
|
||||
value={hostingTypeFilter}
|
||||
onChange={(e) => setHostingTypeFilter(e.target.value)}
|
||||
onChange={(value) => setHostingTypeFilter(value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -607,7 +603,7 @@ export default function SiteList() {
|
||||
<SelectDropdown
|
||||
options={STATUS_OPTIONS}
|
||||
value={statusFilter}
|
||||
onChange={(e) => setStatusFilter(e.target.value)}
|
||||
onChange={(value) => setStatusFilter(value)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -619,7 +615,7 @@ export default function SiteList() {
|
||||
<SelectDropdown
|
||||
options={INTEGRATION_OPTIONS}
|
||||
value={integrationFilter}
|
||||
onChange={(e) => setIntegrationFilter(e.target.value)}
|
||||
onChange={(value) => setIntegrationFilter(value)}
|
||||
/>
|
||||
</div>
|
||||
</Card>
|
||||
@@ -738,19 +734,21 @@ export default function SiteList() {
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => handleSettings(site.id)}
|
||||
className="shadow-theme-xs inline-flex h-9 w-9 items-center justify-center rounded-lg border border-gray-300 text-gray-700 dark:border-gray-700 dark:text-gray-400"
|
||||
className="shadow-theme-xs inline-flex h-9 items-center justify-center rounded-lg border border-gray-300 text-gray-700 dark:border-gray-700 dark:text-gray-400 px-3"
|
||||
title="Configure Sectors"
|
||||
>
|
||||
<SettingsIcon className="w-4 h-4" />
|
||||
<Building2Icon className="w-4 h-4 mr-1" />
|
||||
<span className="text-xs">Sectors</span>
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => navigate(`/sites/${site.id}/settings`)}
|
||||
className="shadow-theme-xs inline-flex h-9 w-9 items-center justify-center rounded-lg border border-gray-300 text-gray-700 dark:border-gray-700 dark:text-gray-400"
|
||||
className="shadow-theme-xs inline-flex h-9 items-center justify-center rounded-lg border border-gray-300 text-gray-700 dark:border-gray-700 dark:text-gray-400 px-3"
|
||||
title="Site Settings"
|
||||
>
|
||||
<SettingsIcon className="w-4 h-4" />
|
||||
<SettingsIcon className="w-4 h-4 mr-1" />
|
||||
<span className="text-xs">Settings</span>
|
||||
</Button>
|
||||
</div>
|
||||
<Switch
|
||||
|
||||
Reference in New Issue
Block a user