diff --git a/src/Components/Banner/BannerTable.jsx b/src/Components/Banner/BannerTable.jsx index d98978e..9b7c1b3 100644 --- a/src/Components/Banner/BannerTable.jsx +++ b/src/Components/Banner/BannerTable.jsx @@ -30,6 +30,7 @@ import { WarningIcon, } from "@chakra-ui/icons"; import ToastBox from "../ToastBox"; +const API_URL = import.meta.env.VITE_API_BASE_URL; const BannerCommunity = ({ dataArray, diff --git a/src/Components/Banner/BannerView.jsx b/src/Components/Banner/BannerView.jsx index 7dcd194..6c80bd2 100644 --- a/src/Components/Banner/BannerView.jsx +++ b/src/Components/Banner/BannerView.jsx @@ -16,6 +16,7 @@ import { VStack, } from "@chakra-ui/react"; import BannerMainCard from "./BannerMainCard"; +const API_URL = import.meta.env.VITE_API_BASE_URL; const BannerView = ({data, isLoading, editLink, center}) => { const banner = data?.data; @@ -64,12 +65,12 @@ const BannerView = ({data, isLoading, editLink, center}) => { rounded={8} w={500} h={240} - src={`https://rubix.betadelivery.com/${banner?.banner_image}`} + src={`${API_URL}/${banner?.banner_image}`} alt="Selected Image" /> */} { // ====================================================[Hooks]=================================================================== @@ -158,7 +159,7 @@ const BlogsAndArticles = () => { { const { id } = useParams(); @@ -75,9 +76,9 @@ const EditBlogsAndArticles = () => { useEffect(() => { if (data?.data) { - setSelectedImage(`https://rubix.betadelivery.com/${blog?.profile_image}`); + setSelectedImage(`${API_URL}/${blog?.profile_image}`); setSelectedImageLarge( - `https://rubix.betadelivery.com/${blog?.content_image_large}` + `${API_URL}/${blog?.content_image_large}` ); setValue("author_name", blog?.author_name); setValue("author_designation", blog?.author_designation); diff --git a/src/Pages/BlogsAndArticles/ViewBlogsAndArticles.jsx b/src/Pages/BlogsAndArticles/ViewBlogsAndArticles.jsx index b0223b5..f28d4e6 100644 --- a/src/Pages/BlogsAndArticles/ViewBlogsAndArticles.jsx +++ b/src/Pages/BlogsAndArticles/ViewBlogsAndArticles.jsx @@ -14,6 +14,7 @@ import { useGetBlogByIdQuery } from "../../Services/api.service"; import FullscreenLoaders from "../../Components/Loaders/FullscreenLoaders"; import { OPACITY_ON_LOAD } from "../../Layout/animations"; import Header from "../../Components/Header"; +const API_URL = import.meta.env.VITE_API_BASE_URL; const ViewBlogsAndArticles = () => { const { id } = useParams(); @@ -66,7 +67,7 @@ const ViewBlogsAndArticles = () => { rounded={8} w={500} h={240} - src={`https://rubix.betadelivery.com/${blog?.content_image_large}`} + src={`${API_URL}/${blog?.content_image_large}`} alt="Selected Image" /> {/*