Skip to content

Commit

Permalink
fix: single events page view
Browse files Browse the repository at this point in the history
  • Loading branch information
sonylomo committed Jun 10, 2024
1 parent c75e2b9 commit b379710
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 18 deletions.
36 changes: 27 additions & 9 deletions src/APP/index.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,47 @@
/* eslint-disable function-paren-newline */
/* eslint-disable implicit-arrow-linebreak */
import { lazy } from "react";

const AboutUs = lazy(() => import("./pages/aboutUs/AboutUs"));
const AllBlogsPage = lazy(() => import("./pages/admin/blogs/AllBlogsPage"));
const AddChapterPage = lazy(() => import("./pages/admin/chapters/AddChapterPage"));
const AllChaptersPage = lazy(() => import("./pages/admin/chapters/AllChaptersPage"));
const AddChapterPage = lazy(() =>
import("./pages/admin/chapters/AddChapterPage")
);
const AllChaptersPage = lazy(() =>
import("./pages/admin/chapters/AllChaptersPage")
);
const AddEventPage = lazy(() => import("./pages/admin/events/AddEventPage"));
const AllEventsPage = lazy(() => import("./pages/admin/events/AllEventsPage"));
const UpdateEventPage = lazy(() => import("./pages/admin/events/UpdateEventPage"));
const UpdateEventPage = lazy(() =>
import("./pages/admin/events/UpdateEventPage")
);
const ForgotPassword = lazy(() => import("./pages/auth/ForgotPassword"));
const LogIn = lazy(() => import("./pages/auth/LogIn"));
const ResetPassword = lazy(() => import("./pages/auth/ResetPassword"));
const SignUp = lazy(() => import("./pages/auth/SignUp"));
const Blog = lazy(() => import("./pages/blog/Blog"));
const Blog2 = lazy(() => import("./pages/blog2/Blog2"));
const Blogs = lazy(() => import("./pages/blogs/Blogs"));
const IndividualChapter = lazy(() => import("./pages/chapter/pages/IndividualChapter"));
const IndividualChapter = lazy(() =>
import("./pages/chapter/pages/IndividualChapter")
);
const CommunityPage = lazy(() => import("./pages/community/CommunityPage"));
// const SingleEvent = lazy(() => import("./pages/community/sections/eventsSection/SingleEvents/SingleEvent"));
const SingleEvent = lazy(() =>
import("./pages/community/sections/eventsPreview/SingleEvents/SingleEvent")
);
const DonatePage = lazy(() => import("./pages/donate/DonatePage"));
const SingleProductDonation = lazy(() => import("./pages/donate/pages/SingleProductDonatePage"));
const SingleProductDonation = lazy(() =>
import("./pages/donate/pages/SingleProductDonatePage")
);
const Error400 = lazy(() => import("./pages/errorPages/Error400"));
const Error403 = lazy(() => import("./pages/errorPages/Error403"));
const Error404 = lazy(() => import("./pages/errorPages/Error404"));
const Error500 = lazy(() => import("./pages/errorPages/Error500"));
const ErrorBoundary = lazy(() => import("./pages/errorPages/ErrorBoundary"));
const EventsPage = lazy(() => import("./pages/events/pages/EventsPage"));
const EventsSection = lazy(() => import("./pages/events/sections/eventsSection/EventsSection"));
const EventsSection = lazy(() =>
import("./pages/events/sections/eventsSection/EventsSection")
);
const GalleryPage = lazy(() => import("./pages/gallery/GalleryPage"));
const LandingPage = lazy(() => import("./pages/landingPage/LandingPage"));
const Layout = lazy(() => import("./pages/Layout"));
Expand All @@ -34,7 +50,9 @@ const Resources = lazy(() => import("./pages/resources/Resources"));
const Homepage = lazy(() => import("./pages/shop/Homepage"));
const Checkout = lazy(() => import("./pages/shop/OrderSummaryPage"));
const ProductDisplay = lazy(() => import("./pages/shop/ProductDisplayPage"));
const CategoriesProducts = lazy(() => import("./pages/shop/sections/CategoriesProducts"));
const CategoriesProducts = lazy(() =>
import("./pages/shop/sections/CategoriesProducts")
);
const SingleItemPage = lazy(() => import("./pages/shop/SingleItemPage"));

export {
Expand All @@ -55,7 +73,7 @@ export {
AboutUs,
CommunityPage,
DonatePage,
// SingleEvent,
SingleEvent,
Blogs,
Blog,
Blog2,
Expand Down
52 changes: 43 additions & 9 deletions src/router/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
ResetPassword,
Resources,
SignUp,
// SingleEvent,
SingleEvent,
Blogs,
EventsPage,
} from "../APP";
Expand Down Expand Up @@ -103,14 +103,14 @@ const router = createBrowserRouter([
</Suspense>
),
},
// {
// path: "/events/:id",
// element: (
// <Suspense fallback={<FallbackLoader />}>
// <SingleEvent />
// </Suspense>
// ),
// },
{
path: "/events/:id",
element: (
<Suspense fallback={<FallbackLoader />}>
<SingleEvent />
</Suspense>
),
},
{
path: "/chapter/:id",
element: (
Expand Down Expand Up @@ -225,6 +225,40 @@ const router = createBrowserRouter([
</Suspense>
),
},
// {
// path: "/admin",
// element: <AdminLayout />,
// children: [
// {
// path: "/admin",
// element: <AllChaptersPage />,
// },
// {
// path: "/admin/all-chapters",
// element: <AllChaptersPage />,
// },
// {
// path: "/admin/events",
// element: <AllEventsPage />,
// },
// {
// path: "/admin/add-chapters",
// element: <AddChapterPage />,
// },
// {
// path: "/admin/events",
// element: <AllEventsPage />,
// },
// {
// path: "/admin/events/add-event",
// element: <AddEventPage />,
// },
// {
// path: "/admin/events/update-event",
// element: <UpdateEventPage />,
// },
// ],
// },
]);

export default router;

0 comments on commit b379710

Please sign in to comment.