Skip to content

Commit b379710

Browse files
committed
fix: single events page view
1 parent c75e2b9 commit b379710

File tree

2 files changed

+70
-18
lines changed

2 files changed

+70
-18
lines changed

src/APP/index.js

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,47 @@
1+
/* eslint-disable function-paren-newline */
2+
/* eslint-disable implicit-arrow-linebreak */
13
import { lazy } from "react";
24

35
const AboutUs = lazy(() => import("./pages/aboutUs/AboutUs"));
46
const AllBlogsPage = lazy(() => import("./pages/admin/blogs/AllBlogsPage"));
5-
const AddChapterPage = lazy(() => import("./pages/admin/chapters/AddChapterPage"));
6-
const AllChaptersPage = lazy(() => import("./pages/admin/chapters/AllChaptersPage"));
7+
const AddChapterPage = lazy(() =>
8+
import("./pages/admin/chapters/AddChapterPage")
9+
);
10+
const AllChaptersPage = lazy(() =>
11+
import("./pages/admin/chapters/AllChaptersPage")
12+
);
713
const AddEventPage = lazy(() => import("./pages/admin/events/AddEventPage"));
814
const AllEventsPage = lazy(() => import("./pages/admin/events/AllEventsPage"));
9-
const UpdateEventPage = lazy(() => import("./pages/admin/events/UpdateEventPage"));
15+
const UpdateEventPage = lazy(() =>
16+
import("./pages/admin/events/UpdateEventPage")
17+
);
1018
const ForgotPassword = lazy(() => import("./pages/auth/ForgotPassword"));
1119
const LogIn = lazy(() => import("./pages/auth/LogIn"));
1220
const ResetPassword = lazy(() => import("./pages/auth/ResetPassword"));
1321
const SignUp = lazy(() => import("./pages/auth/SignUp"));
1422
const Blog = lazy(() => import("./pages/blog/Blog"));
1523
const Blog2 = lazy(() => import("./pages/blog2/Blog2"));
1624
const Blogs = lazy(() => import("./pages/blogs/Blogs"));
17-
const IndividualChapter = lazy(() => import("./pages/chapter/pages/IndividualChapter"));
25+
const IndividualChapter = lazy(() =>
26+
import("./pages/chapter/pages/IndividualChapter")
27+
);
1828
const CommunityPage = lazy(() => import("./pages/community/CommunityPage"));
19-
// const SingleEvent = lazy(() => import("./pages/community/sections/eventsSection/SingleEvents/SingleEvent"));
29+
const SingleEvent = lazy(() =>
30+
import("./pages/community/sections/eventsPreview/SingleEvents/SingleEvent")
31+
);
2032
const DonatePage = lazy(() => import("./pages/donate/DonatePage"));
21-
const SingleProductDonation = lazy(() => import("./pages/donate/pages/SingleProductDonatePage"));
33+
const SingleProductDonation = lazy(() =>
34+
import("./pages/donate/pages/SingleProductDonatePage")
35+
);
2236
const Error400 = lazy(() => import("./pages/errorPages/Error400"));
2337
const Error403 = lazy(() => import("./pages/errorPages/Error403"));
2438
const Error404 = lazy(() => import("./pages/errorPages/Error404"));
2539
const Error500 = lazy(() => import("./pages/errorPages/Error500"));
2640
const ErrorBoundary = lazy(() => import("./pages/errorPages/ErrorBoundary"));
2741
const EventsPage = lazy(() => import("./pages/events/pages/EventsPage"));
28-
const EventsSection = lazy(() => import("./pages/events/sections/eventsSection/EventsSection"));
42+
const EventsSection = lazy(() =>
43+
import("./pages/events/sections/eventsSection/EventsSection")
44+
);
2945
const GalleryPage = lazy(() => import("./pages/gallery/GalleryPage"));
3046
const LandingPage = lazy(() => import("./pages/landingPage/LandingPage"));
3147
const Layout = lazy(() => import("./pages/Layout"));
@@ -34,7 +50,9 @@ const Resources = lazy(() => import("./pages/resources/Resources"));
3450
const Homepage = lazy(() => import("./pages/shop/Homepage"));
3551
const Checkout = lazy(() => import("./pages/shop/OrderSummaryPage"));
3652
const ProductDisplay = lazy(() => import("./pages/shop/ProductDisplayPage"));
37-
const CategoriesProducts = lazy(() => import("./pages/shop/sections/CategoriesProducts"));
53+
const CategoriesProducts = lazy(() =>
54+
import("./pages/shop/sections/CategoriesProducts")
55+
);
3856
const SingleItemPage = lazy(() => import("./pages/shop/SingleItemPage"));
3957

4058
export {
@@ -55,7 +73,7 @@ export {
5573
AboutUs,
5674
CommunityPage,
5775
DonatePage,
58-
// SingleEvent,
76+
SingleEvent,
5977
Blogs,
6078
Blog,
6179
Blog2,

src/router/index.jsx

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
ResetPassword,
2525
Resources,
2626
SignUp,
27-
// SingleEvent,
27+
SingleEvent,
2828
Blogs,
2929
EventsPage,
3030
} from "../APP";
@@ -103,14 +103,14 @@ const router = createBrowserRouter([
103103
</Suspense>
104104
),
105105
},
106-
// {
107-
// path: "/events/:id",
108-
// element: (
109-
// <Suspense fallback={<FallbackLoader />}>
110-
// <SingleEvent />
111-
// </Suspense>
112-
// ),
113-
// },
106+
{
107+
path: "/events/:id",
108+
element: (
109+
<Suspense fallback={<FallbackLoader />}>
110+
<SingleEvent />
111+
</Suspense>
112+
),
113+
},
114114
{
115115
path: "/chapter/:id",
116116
element: (
@@ -225,6 +225,40 @@ const router = createBrowserRouter([
225225
</Suspense>
226226
),
227227
},
228+
// {
229+
// path: "/admin",
230+
// element: <AdminLayout />,
231+
// children: [
232+
// {
233+
// path: "/admin",
234+
// element: <AllChaptersPage />,
235+
// },
236+
// {
237+
// path: "/admin/all-chapters",
238+
// element: <AllChaptersPage />,
239+
// },
240+
// {
241+
// path: "/admin/events",
242+
// element: <AllEventsPage />,
243+
// },
244+
// {
245+
// path: "/admin/add-chapters",
246+
// element: <AddChapterPage />,
247+
// },
248+
// {
249+
// path: "/admin/events",
250+
// element: <AllEventsPage />,
251+
// },
252+
// {
253+
// path: "/admin/events/add-event",
254+
// element: <AddEventPage />,
255+
// },
256+
// {
257+
// path: "/admin/events/update-event",
258+
// element: <UpdateEventPage />,
259+
// },
260+
// ],
261+
// },
228262
]);
229263

230264
export default router;

0 commit comments

Comments
 (0)