diff --git a/src/Components/Banner/BannerTable.jsx b/src/Components/Banner/BannerTable.jsx
new file mode 100644
index 0000000..6812368
--- /dev/null
+++ b/src/Components/Banner/BannerTable.jsx
@@ -0,0 +1,339 @@
+import React, { useRef, useState } from "react";
+import {
+ Box,
+ Text,
+ Tooltip,
+ HStack,
+ Input,
+ Select,
+ Image,
+ Menu,
+ MenuButton,
+ MenuList,
+ MenuItem,
+ Switch,
+ Portal,
+ useToast,
+} from "@chakra-ui/react";
+import { Link as RouterLink } from "react-router-dom";
+import { HiDotsVertical } from "react-icons/hi";
+import { formatDate } from "../../Components/Functions/UTCConvertor";
+import CustomAlertDialog from "../../Components/CustomAlertDialog";
+import DataTable from "../DataTable/DataTable";
+import Header from "../Header";
+import { OPACITY_ON_LOAD } from "../../Layout/animations";
+import { TABLE_PAGINATION } from "../../Constants/Paginations";
+import { ChevronLeftIcon, ChevronRightIcon } from "@chakra-ui/icons";
+
+const BannerCommunity = ({ dataArray, deleteApi, statusUpdateApi, title, addLink }) => {
+ // ====================================================[Hooks]===================================================================
+ const toast = useToast();
+ const [deleteAlert, setDeleteAlert] = useState(false);
+ const [actionId, setActionId] = useState(null);
+ const [deleteIsLoading, setDeleteIsLoading] = useState(false);
+ const [searchTerm, setSearchTerm] = useState("");
+ const [statusFilter, setStatusFilter] = useState("all");
+
+// const [pageSize, setPageSize] = useState(TABLE_PAGINATION?.size);
+// const [currentPage, setCurrentPage] = useState(1);
+// const [displayRange, setDisplayRange] = useState({
+// start: TABLE_PAGINATION?.page,
+// end: pageSize,
+// });
+
+ // ====================================================[Functions]===================================================================
+ const handleDelete = async (bannerId) => {
+ try {
+ // Trigger the mutation
+ setDeleteIsLoading(true);
+ await deleteApi(bannerId)
+ .then((response) => {
+ // Handle the response here
+ console.log("Mutation response:", response?.data?.statusCode);
+ console.log("Mutation response:", response?.data?.message);
+
+ if (response?.data?.statusCode === 200) {
+ setDeleteIsLoading(false);
+ setDeleteAlert(false);
+ toast({
+ title: response?.data?.message,
+ status: "success",
+ duration: 1000,
+ isClosable: true,
+ });
+ }
+ })
+ .catch((error) => {
+ console.error("Error creating community:", error);
+ setDeleteIsLoading(false);
+ setDeleteAlert(false);
+ });
+ } catch (error) {
+ // Handle errors
+ console.error("Error deleting community:", error);
+ }
+ };
+
+ const handleUpdateStatus = async (id) => {
+ console.log(id);
+
+ try {
+ // Trigger the mutation
+ await statusUpdateApi({ id })
+ .then((response) => {
+ console.log(response?.data);
+ if (response?.data?.statusCode === 201) {
+ console.log("toasted");
+ toast({
+ title: response?.data?.message,
+ status: "success",
+ isClosable: true,
+ });
+ }
+ })
+ .catch((error) => {
+ console.log(error);
+ });
+ } catch (error) {
+ // Handle errors
+ console.error("Error updating community status:", error);
+ }
+ };
+
+ // ====================================================[Table Filter]================================================================
+ const filteredData = dataArray?.data?.data?.rows?.filter((item) => {
+ // Filter by name (case insensitive)
+ const name = item.Heading;
+ const searchLower = searchTerm.toLowerCase();
+ const nameMatches = name.toLowerCase().includes(searchLower);
+
+ const status = item.status;
+
+ const statusMatches =
+ statusFilter === "all" ||
+ (statusFilter === "active" && status === true) ||
+ (statusFilter === "inactive" && status === false);
+
+ return nameMatches && statusMatches;
+ });
+
+ // ====================================================[Table Setup]================================================================
+ const tableHeadRow = [
+ "Banner image",
+ "Heading",
+ "Sub heading",
+ "Button title",
+ "Active",
+ "Created At",
+ ];
+
+ const extractedArray = filteredData?.map((item, index) => {
+ return {
+ "Banner image": (
+
+ ),
+ Heading: (
+
+
+
+ {item?.Heading}
+
+
+
+ ),
+ "Sub heading": (
+
+
+
+ {item?.sub_heading}
+
+
+
+ ),
+ "Button title": item?.CTO_button_title,
+ Active: (
+ handleUpdateStatus(item.id)}
+ isChecked={item.status}
+ />
+ ),
+ "Created At": (
+
+
+ {formatDate(item?.createdAt)}
+
+
+
+ ),
+ };
+ });
+
+ // ====================================================[Pagination Setup]================================================================
+ const paginationPrev = () => {
+ if (currentPage > 1) {
+ setCurrentPage(currentPage - 1);
+ updateDisplayRange(currentPage - 1);
+ }
+ };
+
+ const paginationNext = () => {
+ const totalPages = Math.ceil(community?.data?.data?.totalItems / pageSize);
+ if (currentPage < totalPages) {
+ setCurrentPage(currentPage + 1);
+ updateDisplayRange(currentPage + 1);
+ }
+ };
+ const updateDisplayRange = (page) => {
+ const start = (page - 1) * pageSize + 1;
+ const end = Math.min(
+ start + pageSize - 1,
+ community?.data?.data?.totalItems
+ );
+ setDisplayRange({ start, end });
+ };
+
+ return (
+
+
+ {/* ====================================================[ Top bar ]================================================================ */}
+
+
+
+ setSearchTerm(e.target.value)}
+ />
+
+
+
+ {/* */}
+
+ {/*
+
+
+ {displayRange.start} - {displayRange.end} of{" "}
+ {dataArray?.data?.data?.totalItems}
+
+
+ */}
+
+
+
+
+
+
+ {/* ====================================================[ Table ]================================================================ */}
+
+ {/* ====================================================[ Alert ]================================================================ */}
+ setDeleteAlert(false)}
+ isOpen={deleteAlert}
+ alertHandler={() => handleDelete(actionId)}
+ message={"Are you sure you want to delete member?"}
+ isLoading={deleteIsLoading}
+ />
+
+ );
+};
+
+export default BannerCommunity;
diff --git a/src/Components/Banner/BannerView.jsx b/src/Components/Banner/BannerView.jsx
index 77cde81..8c23904 100644
--- a/src/Components/Banner/BannerView.jsx
+++ b/src/Components/Banner/BannerView.jsx
@@ -15,7 +15,7 @@ import {
VStack,
} from "@chakra-ui/react";
-const BannerView = ({data, isLoading}) => {
+const BannerView = ({data, isLoading, editLink}) => {
const banner = data?.data;
return isLoading ? (
@@ -33,7 +33,7 @@ const BannerView = ({data, isLoading}) => {
diff --git a/src/Components/BannerStack.jsx b/src/Components/BannerStack.jsx
index 6f9bd1f..2c7475f 100644
--- a/src/Components/BannerStack.jsx
+++ b/src/Components/BannerStack.jsx
@@ -50,8 +50,8 @@ const BannerStack = ({
>
{bannerIsLoading
? Array.from({ length: 3 }).map((_, index) => (
-
-
+
+
))
: bannerArray?.map(
diff --git a/src/Pages/Banners/BannerBuild/BannerBuildView.jsx b/src/Pages/Banners/BannerBuild/BannerBuildView.jsx
index 9fe72de..722068a 100644
--- a/src/Pages/Banners/BannerBuild/BannerBuildView.jsx
+++ b/src/Pages/Banners/BannerBuild/BannerBuildView.jsx
@@ -1,19 +1,6 @@
import React from "react";
import { useParams } from "react-router-dom";
import { useGetBuildBannerByIdQuery } from "../../../Services/api.service";
-import { OPACITY_ON_LOAD } from "../../../Layout/animations";
-import FullscreenLoaders from "../../../Components/Loaders/FullscreenLoaders";
-import { formatDate } from "../../../Components/Functions/UTCConvertor";
-import Header from "../../../Components/Header";
-import {
- Box,
- Button,
- Divider,
- Image,
- StackDivider,
- Tag,
- VStack,
-} from "@chakra-ui/react";
import BannerView from "../../../Components/Banner/BannerView";
const BannerBuildView = () => {
@@ -21,7 +8,7 @@ const BannerBuildView = () => {
const { data, error, isLoading } = useGetBuildBannerByIdQuery(id);
return (
-
+
);
};
diff --git a/src/Pages/Banners/BannerCommunity/BannerCommunity.jsx b/src/Pages/Banners/BannerCommunity/BannerCommunity.jsx
index 3e967e6..dbe8acb 100644
--- a/src/Pages/Banners/BannerCommunity/BannerCommunity.jsx
+++ b/src/Pages/Banners/BannerCommunity/BannerCommunity.jsx
@@ -1,317 +1,25 @@
-import React, { useRef, useState } from "react";
-import {
- Avatar,
- Box,
- Link,
- Tag,
- Text,
- WrapItem,
- Tooltip,
- Divider,
- Stack,
- HStack,
- Input,
- Button,
- Select,
- Image,
- Menu,
- MenuButton,
- MenuList,
- MenuItem,
- Switch,
- Portal,
- useDisclosure,
- AlertDialog,
- AlertDialogOverlay,
- AlertDialogContent,
- AlertDialogHeader,
- AlertDialogCloseButton,
- AlertDialogBody,
- AlertDialogFooter,
- useToast,
- Skeleton,
- VStack,
-} from "@chakra-ui/react";
-import { GrAdd } from "react-icons/gr";
-import { AddIcon, ChevronDownIcon, HamburgerIcon } from "@chakra-ui/icons";
-import DataTable from "../../../Components/DataTable/DataTable";
-import CommunityBanner from "../../../Components/CommunityBanner";
-import { OPACITY_ON_LOAD } from "../../../Layout/animations";
-import { v4 as uuidv4 } from "uuid";
-import { Link as RouterLink } from "react-router-dom";
+import React from "react";
import {
useDeleteCommunityBannerMutation,
- useDeleteCommunityMutation,
useGetCommunityBannerQuery,
- useGetCommunityByIdQuery,
- useGetCommunityQuery,
useUpdateCommunityBannerStatusMutation,
- useUpdateCommunityStatusMutation,
} from "../../../Services/api.service";
-import { HiDotsVertical } from "react-icons/hi";
-import TimeCalculator from "../../../Components/Functions/TimeCalculator";
-import { formatDate } from "../../../Components/Functions/UTCConvertor";
-import CustomAlertDialog from "../../../Components/CustomAlertDialog";
-import WebButton from "../../../Components/WebButton";
-import CommunityCardDisplay from "../../Community/CommunityCardDisplay";
-import CommunityBannerCard from "../../Community/CommunityBannerCard";
-import Header from "../../../Components/Header";
+import BannerTable from "../../../Components/Banner/BannerTable";
const BannerCommunity = () => {
- // ====================================================[Hooks]===================================================================
- const toast = useToast();
- const [deleteAlert, setDeleteAlert] = useState(false);
- const [actionId, setActionId] = useState(null);
- const [deleteIsLoading, setDeleteIsLoading] = useState(false);
- const [searchTerm, setSearchTerm] = useState("");
- const [statusFilter, setStatusFilter] = useState("all");
- const community = useGetCommunityQuery();
const communityBanner = useGetCommunityBannerQuery();
const [deleteCommunityBanner] = useDeleteCommunityBannerMutation();
const [updateCommunityBannerStatus] =
useUpdateCommunityBannerStatusMutation();
- // ====================================================[Functions]===================================================================
- const handleDelete = async (bannerId) => {
- try {
- // Trigger the mutation
- setDeleteIsLoading(true);
- await deleteCommunityBanner(bannerId)
- .then((response) => {
- // Handle the response here
- console.log("Mutation response:", response?.data?.statusCode);
- console.log("Mutation response:", response?.data?.message);
-
- if (response?.data?.statusCode === 200) {
- setDeleteIsLoading(false);
- setDeleteAlert(false);
- toast({
- title: response?.data?.message,
- status: "success",
- duration: 1000,
- isClosable: true,
- });
- }
- })
- .catch((error) => {
- console.error("Error creating community:", error);
- setDeleteIsLoading(false);
- setDeleteAlert(false);
- });
- } catch (error) {
- // Handle errors
- console.error("Error deleting community:", error);
- }
- };
-
- const handleUpdateStatus = async (id) => {
- console.log(id);
-
- try {
- // Trigger the mutation
- await updateCommunityBannerStatus({ id })
- .then((response) => {
- console.log(response?.data);
- if (response?.data?.statusCode === 200) {
- console.log("toasted");
- toast({
- title: response?.data?.message,
- status: "success",
- isClosable: true,
- });
- }
- })
- .catch((error) => {
- console.log(error);
- });
- } catch (error) {
- // Handle errors
- console.error("Error updating community status:", error);
- }
- };
-
- // ====================================================[Table Filter]================================================================
- const filteredData = communityBanner?.data?.data?.rows?.filter((item) => {
- // Filter by name (case insensitive)
- const name = item.Heading;
- const searchLower = searchTerm.toLowerCase();
- const nameMatches = name.toLowerCase().includes(searchLower);
-
- return nameMatches;
- });
-
- // ====================================================[Table Setup]================================================================
- const tableHeadRow = [
- "Banner image",
- "Heading",
- "Sub heading",
- "Button title",
- "Active",
- "Created At",
- ];
-
- const extractedArray = filteredData?.map((item, index) => {
- return {
- "Banner image": (
-
- ),
- Heading: (
-
-
-
- {item?.Heading}
-
-
-
- ),
- "Sub heading": (
-
-
-
- {item?.sub_heading}
-
-
-
- ),
- "Button title": item?.CTO_button_title,
- Active: (
- handleUpdateStatus(item.id)}
- isChecked={item.status}
- />
- ),
- "Created At": (
-
-
- {formatDate(item?.createdAt)}
-
-
-
- ),
- };
- });
-
return (
-
-
-
-
-
- {/* ====================================================[ Top bar ]================================================================ */}
-
- {/* */}
-
-
- {/*
-
- Community Banners
-
- */}
-
- setSearchTerm(e.target.value)}
- />
-
-
-
-
-
-
- {/* ====================================================[ Table ]================================================================ */}
-
- {/* ====================================================[ Alert ]================================================================ */}
- setDeleteAlert(false)}
- isOpen={deleteAlert}
- alertHandler={() => handleDelete(actionId)}
- message={"Are you sure you want to delete member?"}
- isLoading={deleteIsLoading}
- />
-
+
);
};
diff --git a/src/Pages/Banners/BannerCommunity/BannerCommunityView.jsx b/src/Pages/Banners/BannerCommunity/BannerCommunityView.jsx
index c8a130e..67c30b9 100644
--- a/src/Pages/Banners/BannerCommunity/BannerCommunityView.jsx
+++ b/src/Pages/Banners/BannerCommunity/BannerCommunityView.jsx
@@ -14,150 +14,14 @@ import { OPACITY_ON_LOAD } from "../../../Layout/animations";
import FullscreenLoaders from "../../../Components/Loaders/FullscreenLoaders";
import { formatDate } from "../../../Components/Functions/UTCConvertor";
import Header from "../../../Components/Header";
+import BannerView from "../../../Components/Banner/BannerView";
const BannerComunityViewPage = () => {
const { id } = useParams();
const { data, error, isLoading } = useGetCommunityBannerByIdQuery(id);
- const banner = data?.data;
- useEffect(() => {}, [data]);
- return isLoading ? (
-
- ) : (
-
-
-
-
-
- Banners Info
-
-
- Select the platform for which you need to create this campaign.
-
-
-
-
-
- Display banner
-
-
- Below is the profile that will be displayed on the community page.
-
-
-
-
- {/* */}
-
-
-
-
-
-
- Status
-
- {data?.data?.status ? (
-
- Active
-
- ) : (
-
- Inactive
-
- )}
-
-
-
-
- Heading
-
-
- {banner?.Heading}
-
-
-
-
-
- Sub heading
-
-
- {banner?.sub_heading}
-
-
-
-
-
- Button title
-
-
- {banner?.CTO_button_title}
-
-
-
-
-
- Button link
-
-
- {banner?.CTO_button_link}
-
-
-
-
-
- Created At
-
-
- {formatDate(banner?.createdAt)}
-
-
-
-
-
- Updated At
-
-
- {formatDate(banner?.updatedAt)}
-
-
-
-
-
-
-
- );
+ return ;
+
};
export default BannerComunityViewPage;
diff --git a/src/Pages/Banners/BannerLearn/BannerLearn.jsx b/src/Pages/Banners/BannerLearn/BannerLearn.jsx
index ec60882..d1c1fee 100644
--- a/src/Pages/Banners/BannerLearn/BannerLearn.jsx
+++ b/src/Pages/Banners/BannerLearn/BannerLearn.jsx
@@ -52,6 +52,7 @@ import {
useUpdateCommunityStatusMutation,
useUpdateLearnBannerStatusMutation,
} from "../../../Services/api.service";
+import BannerTable from "../../../Components/Banner/BannerTable"
import { HiDotsVertical } from "react-icons/hi";
import TimeCalculator from "../../../Components/Functions/TimeCalculator";
import { formatDate } from "../../../Components/Functions/UTCConvertor";
@@ -62,266 +63,18 @@ import CommunityBannerCard from "../../Community/CommunityBannerCard";
import Header from "../../../Components/Header";
const BannerLearn = () => {
- // ====================================================[Hooks]===================================================================
- const toast = useToast();
- const [deleteAlert, setDeleteAlert] = useState(false);
- const [actionId, setActionId] = useState(null);
- const [deleteIsLoading, setDeleteIsLoading] = useState(false);
- const [searchTerm, setSearchTerm] = useState("");
- const [statusFilter, setStatusFilter] = useState("all");
- const Learn = useGetLearnBannerQuery();
const learnBanner = useGetLearnBannerQuery();
const [deleteLearnBanner] = useDeleteLearnBannerMutation();
const [updateLearnBannerStatus] = useUpdateLearnBannerStatusMutation();
- // ====================================================[Functions]===================================================================
- const handleDelete = async (bannerId) => {
- try {
- // Trigger the mutation
- setDeleteIsLoading(true);
- await deleteLearnBanner(bannerId)
- .then((response) => {
- // Handle the response here
- console.log("Mutation response:", response?.data?.statusCode);
- console.log("Mutation response:", response?.data?.message);
-
- if (response?.data?.statusCode === 200) {
- setDeleteIsLoading(false);
- setDeleteAlert(false);
- toast({
- title: response?.data?.message,
- status: "success",
- duration: 1000,
- isClosable: true,
- });
- }
- })
- .catch((error) => {
- console.error("Error creating Learn:", error);
- setDeleteIsLoading(false);
- setDeleteAlert(false);
- });
- } catch (error) {
- // Handle errors
- console.error("Error deleting Learn:", error);
- }
- };
-
- const handleUpdateStatus = async (id) => {
- console.log(id);
-
- try {
- // Trigger the mutation
- await updateLearnBannerStatus({ id })
- .then((response) => {
- console.log(response?.data);
- if (response?.data?.statusCode === 201) {
- console.log("toasted");
- toast({
- title: response?.data?.message,
- status: "success",
- isClosable: true,
- });
- }
- })
- .catch((error) => {
- console.log(error);
- });
- } catch (error) {
- // Handle errors
- console.error("Error updating community status:", error);
- }
- };
-
- // ====================================================[Table Filter]================================================================
- const filteredData = learnBanner?.data?.data?.rows?.filter((item) => {
- // Filter by name (case insensitive)
- const name = item.Heading;
- const searchLower = searchTerm.toLowerCase();
- const nameMatches = name.toLowerCase().includes(searchLower);
-
-
-
- // Filter by status
- const status = item.status;
-
- const statusMatches =
- statusFilter === "all" ||
- (statusFilter === "active" && status === true) ||
- (statusFilter === "inactive" && status === false);
-
- return nameMatches && statusMatches;
- });
-
- // ====================================================[Table Setup]================================================================
- const tableHeadRow = [
- "Banner image",
- "Heading",
- "Sub heading",
- "Button title",
- "Active",
- "Created At",
- ];
-
- const extractedArray = filteredData?.map((item, index) => {
- return {
- "Banner image": (
-
- ),
- Heading: (
-
-
-
- {item?.Heading}
-
-
-
- ),
- "Sub heading": (
-
-
-
- {item?.sub_heading}
-
-
-
- ),
- "Button title": item?.CTO_button_title,
- Active: (
- handleUpdateStatus(item.id)}
- isChecked={item.status}
- />
- ),
- "Created At": (
-
-
- {formatDate(item?.createdAt)}
-
-
-
- ),
- };
- });
-
return (
-
-
- {/* ====================================================[ Top bar ]================================================================ */}
-
- {/* */}
-
-
- {/*
-
- Community Banners
-
- */}
-
- setSearchTerm(e.target.value)}
- />
-
-
-
-
-
-
- {/* ====================================================[ Table ]================================================================ */}
-
- {/* ====================================================[ Alert ]================================================================ */}
- setDeleteAlert(false)}
- isOpen={deleteAlert}
- alertHandler={() => handleDelete(actionId)}
- message={"Are you sure you want to delete member?"}
- isLoading={deleteIsLoading}
- />
-
+
);
};
diff --git a/src/Pages/Banners/BannersNew/BannersNews.jsx b/src/Pages/Banners/BannersNew/BannersNews.jsx
index 87ff5fe..78a991e 100644
--- a/src/Pages/Banners/BannersNew/BannersNews.jsx
+++ b/src/Pages/Banners/BannersNew/BannersNews.jsx
@@ -7,7 +7,7 @@ const BannersNews = () => {
const { id } = useParams();
const { data, error, isLoading } = useGetNewsBannerByIdQuery(id);
- return ;
+ return ;
}
export default BannersNews
\ No newline at end of file
diff --git a/src/Pages/Community/ComunityViewPage.jsx b/src/Pages/Community/ComunityViewPage.jsx
index e86b550..9855186 100644
--- a/src/Pages/Community/ComunityViewPage.jsx
+++ b/src/Pages/Community/ComunityViewPage.jsx
@@ -4,12 +4,155 @@ import {
useGetCommunityByIdQuery,
} from "../../Services/api.service";
import BannerView from "../../Components/Banner/BannerView";
+import FullscreenLoaders from "../../Components/Loaders/FullscreenLoaders";
+import { Box, Divider, Image, Tag } from "@chakra-ui/react";
+import Header from "../../Components/Header";
+import { OPACITY_ON_LOAD } from "../../Layout/animations";
+import { formatDate } from "../../Components/Functions/UTCConvertor";
const ComunityViewPage = () => {
const { id } = useParams();
const { data, error, isLoading } = useGetCommunityByIdQuery(id);
- return ;
+ console.log(data);
+
+ return isLoading ? (
+
+ ) : (
+
+
+
+
+
+ Banners Info
+
+
+ Select the platform for which you need to create this campaign.
+
+
+
+
+
+ Display banner
+
+
+ Below is the profile that will be displayed on the community page.
+
+
+
+
+ {/* */}
+
+
+
+
+
+
+ Status
+
+ {data?.data?.status ? (
+
+ Active
+
+ ) : (
+
+ Inactive
+
+ )}
+
+
+
+
+ Author name
+
+
+ {data?.data?.member_name}
+
+
+
+
+
+ Designation
+
+
+ {data?.data?.designation}
+
+
+
+
+
+ Description
+
+
+ {data?.data?.description}
+
+
+
+
+
+ Linked In
+
+
+ {data?.data?.linkedin}
+
+
+
+
+
+ Created At
+
+
+ {formatDate(data?.data?.createdAt)}
+
+
+
+
+
+ Updated At
+
+
+ {formatDate(data?.data?.updatedAt)}
+
+
+
+
+
+
+
+ );
};
export default ComunityViewPage;
diff --git a/src/Pages/Events/ViewLearnBanner.jsx b/src/Pages/Events/ViewLearnBanner.jsx
index d769c00..55b7380 100644
--- a/src/Pages/Events/ViewLearnBanner.jsx
+++ b/src/Pages/Events/ViewLearnBanner.jsx
@@ -9,7 +9,7 @@ const ViewLearnBanner = () => {
const { data, error, isLoading } = useGetLearnBannerByIdQuery(id);
- return ;
+ return ;
};
export default ViewLearnBanner;
diff --git a/src/Routes/Routes.js b/src/Routes/Routes.js
index 1bf94f3..0d7637d 100644
--- a/src/Routes/Routes.js
+++ b/src/Routes/Routes.js
@@ -31,36 +31,44 @@ import BannersNews from "../Pages/Banners/BannersNew/BannersNews";
export const RouteLink = [
{ path: "/", Component: Home },
{ path: "/videos", Component: Videos },
- { path: "/news", Component: News },
- { path: "/events", Component: Events },
{ path: "/whitepaper", Component: Whitepapers },
- { path: "/community", Component: Community },
{ path: "/help-and-support", Component: HelpAndSupport },
+ { path: "/community", Component: Community },
{ path: "community/view/:id", Component: ComunityViewPage },
{ path: "community/edit/:id", Component: ComunityEditPage },
{ path: "community/add-comunity", Component: AddComunity },
{ path: "community-table-view", Component: CommunityCardsTableView },
+ // =============[ community banner ]================
{ path: "banner/banner-community", Component: BannerCommunity },
{ path: "banner/banner-community/add-banner", Component: AddBanner },
- {
- path: "banner/banner-community/edit/:id",
- Component: BannerComunityEditPage,
- },
- {
- path: "banner/banner-community/view/:id",
- Component: BannerComunityViewPage,
- },
+ { path: "banner/banner-community/edit/:id", Component: BannerComunityEditPage },
+ { path: "banner/banner-community/view/:id", Component: BannerComunityViewPage },
- // =============[ learn ]================
+ // =============[ learn banner ]================
+ { path: "banner/learn", Component: BannerLearn },
{ path: "banner/learn/add-banner", Component: AddLearnBanner },
{ path: "banner/learn/view/:id", Component: ViewLearnBanner },
+ { path: "banner/learn/edit/:id", Component: ViewLearnBanner },
- // =============[ build ]================
+ // =============[ build banner ]================
{ path: "banner/build/view/:id", Component: BannerBuildView },
+ { path: "banner/build/edit/:id", Component: BannerBuildView },
+
+
+ // =============[ news banner ]================
{ path: "banner/news/view/:id", Component: BannersNews },
+ { path: "banner/news/edit/:id", Component: BannersNews },
+
+
+
+
+
+
+
+
// =============[ blog ]================
{ path: "/blogs-articles", Component: BlogsAndArticles },
@@ -69,10 +77,12 @@ export const RouteLink = [
{ path: "blogs-articles/edit/:id", Component: EditBlogsAndArticles },
// =============[ news ]================
+ { path: "/news", Component: News },
{ path: "/news/view/:id", Component: ViewNews },
{ path: "/news/add-news", Component: AddNews },
{ path: "/news/edit/:id", Component: EditNews },
// =============[ events ]================
+ { path: "/events", Component: Events },
{ path: "/events/add-events", Component: AddEvents },
];