admin/app/(dashboard)/manage-events/[id]/edit/page.tsx
alisaza 82593dc18c refactor(events): update event management components and remove unused files
- Replaced `LIST_PUBLIC_CATEGORIES` with `LIST_ADMIN_CATEGORIES_FLAT` in `ArticleFormModal.tsx`.
- Removed the "Add Event" button from the dashboard page.
- Simplified the `EventsPage` by removing the button and adjusting the layout.
- Cleaned up the `AdminEventEditPage` by removing unnecessary props.
- Deleted unused layout and page files related to event creation.
- Updated `AdminAuthContent` to use `useAdminCitiesQuery` instead of `useDiscoveryCitiesQuery`.
- Refactored `EventGuestListAccessPanel` to remove the `accessMode` prop and adjust API calls accordingly.
- Removed several unused components and tests related to event creation, enhancing project maintainability.
2026-09-07 18:09:55 +03:30

38 lines
1.0 KiB
TypeScript

'use client'
import dynamic from 'next/dynamic'
import { useParams } from 'next/navigation'
import PageNavbar from '@/components/layouts/PageNavbar'
import { DetailSkeleton } from '@/components/feedback/LoadingState'
import { APP_ROUTES } from '@/constants/routes'
import { texts } from '@/texts'
const EventEditForm = dynamic(() => import('@/features/events/edit/EventEditForm'), {
ssr: false,
loading: () => <DetailSkeleton />,
})
const AdminEventEditPage = () => {
const eventId = useParams<{ id: string }>().id
if (!eventId) return <p className="p-4 text-sm text-fourth-900">{texts.events.invalidEventId}</p>
const detailHref = APP_ROUTES.MANAGE_EVENT_DETAIL(eventId)
return (
<section className="h-full w-full">
<PageNavbar pageTitle={texts.events.editEventTitle} />
<div className="admin-page-container">
<EventEditForm
cancelHref={detailHref}
eventId={eventId}
successHref={detailHref}
/>
</div>
</section>
)
}
export default AdminEventEditPage