[update] - downlaod image url

This commit is contained in:
Swapnil Bendal
2024-06-10 15:12:25 +05:30
parent e312b8ed41
commit cbe367aafa
26 changed files with 65 additions and 39 deletions

View File

@@ -23,6 +23,7 @@ import { useGetBlogQuery } from "../../Redux/slice/blogsSlice";
import { Link, useParams } from "react-router-dom";
import NotFound from "../../pages/NotFound";
import Loader from "../Loader/Loader";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const ArticlePage = () => {
const { title_slug } = useParams();
@@ -136,7 +137,7 @@ const ArticlePage = () => {
<Avatar
size="lg"
name="Dan Abrahmov"
src={`https://rubix.betadelivery.com/${matchingArticles.profile_image}`}
src={`${API_URL} /${matchingArticles.profile_image}`}
/>
<Box
@@ -156,7 +157,7 @@ const ArticlePage = () => {
<Box
height={"70vh"}
width={"85vw"}
backgroundImage={`url(https://rubix.betadelivery.com/${matchingArticles.content_image_large})`}
backgroundImage={`url(${API_URL} /${matchingArticles.content_image_large})`}
backgroundRepeat={"no-repeat"}
backgroundSize={"cover"}
position="relative"
@@ -237,25 +238,25 @@ const ArticlePage = () => {
}}
>
<TelegramShareButton
url={`https://rubix.betadelivery.com/blogs/${matchingArticles.title_slug}`}
url={`${API_URL} /blogs/${matchingArticles.title_slug}`}
quote={matchingArticles.title}
>
<Image cursor={"pointer"} mb={4} w={6} h={6} src={tele} />
</TelegramShareButton>
<TwitterShareButton
url={`https://rubix.betadelivery.com/blogs/${matchingArticles.title_slug}`}
url={`${API_URL} /blogs/${matchingArticles.title_slug}`}
quote={matchingArticles.title}
>
<Image cursor={"pointer"} mb={4} w={6} h={6} src={x} />
</TwitterShareButton>
<FacebookShareButton
url={`https://rubix.betadelivery.com/blogs/${matchingArticles.title_slug}`}
url={`${API_URL} /blogs/${matchingArticles.title_slug}`}
quote={matchingArticles.title}
>
<Image cursor={"pointer"} mb={4} w={6} h={6} src={fb} />
</FacebookShareButton>
<LinkedinShareButton
url={`https://rubix.betadelivery.com/blogs/${matchingArticles.title_slug}`}
url={`${API_URL} /blogs/${matchingArticles.title_slug}`}
quote={matchingArticles.title}
>
<Image cursor={"pointer"} mb={4} w={6} h={6} src={linked} />

View File

@@ -29,6 +29,7 @@ import { useGetBlogQuery } from "../../Redux/slice/blogsSlice";
import { Link, useParams } from "react-router-dom";
import NotFound from "../../pages/NotFound";
import Loader from "../Loader/Loader";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const BlogPost = () => {
const { title_slug } = useParams();
@@ -149,7 +150,7 @@ const BlogPost = () => {
<Avatar
size="lg"
name="Dan Abrahmov"
src={`https://rubix.betadelivery.com/${matchingBlogPost.profile_image}`}
src={`${API_URL} /${matchingBlogPost.profile_image}`}
/>
<Box
@@ -169,7 +170,7 @@ const BlogPost = () => {
<Box
height={"70vh"}
width={"85vw"}
backgroundImage={`url(https://rubix.betadelivery.com/${matchingBlogPost.content_image_large})`}
backgroundImage={`url(${API_URL} /${matchingBlogPost.content_image_large})`}
backgroundRepeat={"no-repeat"}
backgroundSize={"cover"}
position="relative"
@@ -250,25 +251,25 @@ const BlogPost = () => {
}}
>
<TelegramShareButton
url={`https://rubix.betadelivery.com/blogs/${matchingBlogPost.title_slug}`}
url={`${API_URL} /blogs/${matchingBlogPost.title_slug}`}
quote={matchingBlogPost.title}
>
<Image cursor={"pointer"} mb={4} w={6} h={6} src={tele} />
</TelegramShareButton>
<TwitterShareButton
url={`https://rubix.betadelivery.com/blogs/${matchingBlogPost.title_slug}`}
url={`${API_URL} /blogs/${matchingBlogPost.title_slug}`}
quote={matchingBlogPost.title}
>
<Image cursor={"pointer"} mb={4} w={6} h={6} src={x} />
</TwitterShareButton>
<FacebookShareButton
url={`https://rubix.betadelivery.com/blogs/${matchingBlogPost.title_slug}`}
url={`${API_URL} /blogs/${matchingBlogPost.title_slug}`}
quote={matchingBlogPost.title}
>
<Image cursor={"pointer"} mb={4} w={6} h={6} src={fb} />
</FacebookShareButton>
<LinkedinShareButton
url={`https://rubix.betadelivery.com/blogs/${matchingBlogPost.title_slug}`}
url={`${API_URL} /blogs/${matchingBlogPost.title_slug}`}
quote={matchingBlogPost.title}
>
<Image cursor={"pointer"} mb={4} w={6} h={6} src={linked} />

View File

@@ -4,6 +4,7 @@ import { Box, Button, Container, Text } from "@chakra-ui/react";
import banner from "../../assets/images/BuildBanner.webp";
import { Link } from "react-router-dom";
import Loader from "../Loader/Loader";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const BannerContent = [
{
@@ -40,7 +41,7 @@ const BuildBanner = ({ data, isLoading }) => {
<Box
key={item.id}
height={"100vh"}
backgroundImage={`url(https://rubix.betadelivery.com/${item.banner_image})`}
backgroundImage={`url(${API_URL} /${item.banner_image})`}
backgroundRepeat={"no-repeat"}
backgroundSize={"cover"}
display={"grid"}

View File

@@ -6,6 +6,7 @@ import { Badge } from "@chakra-ui/react";
import Loader from "../Loader/Loader";
import { Link } from "react-router-dom";
import { useGetEventsViewQuery } from "../../Redux/slice/eventsViewSlice";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const HappenCard = ({ key, date, text, para, loader, title, img }) => {
const { data, isLoading, error } = useGetEventsViewQuery();
@@ -66,7 +67,7 @@ const HappenCard = ({ key, date, text, para, loader, title, img }) => {
{day}
</Text>
<Image
src={`https://rubix.betadelivery.com/${img}`}
src={`${API_URL} /${img}`}
height={"250px"}
width={"100%"}
objectFit={"cover"}

View File

@@ -7,6 +7,7 @@ import { Badge } from "@chakra-ui/react";
import { Link, useParams } from "react-router-dom";
import { useGetBlogQuery } from "../../Redux/slice/blogsSlice";
import Chip from "../Chip/Chip";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const HomeCard = ({ cardkey, date, text, link }) => {
const { data } = useGetBlogQuery();
@@ -50,7 +51,7 @@ const HomeCard = ({ cardkey, date, text, link }) => {
objectFit={"cover"}
borderRadius={"10px"}
objectPosition={"center"}
src={`https://rubix.betadelivery.com/${card.content_image_large}`}
src={`${API_URL} /${card.content_image_large}`}
/>
<Box padding={"1rem 1rem 0 1rem"}>
{card?.tags?.slice(0, 2).map((tag, index) => (

View File

@@ -2,6 +2,7 @@
/* eslint-disable no-unused-vars */
import { Box, Container, Text, Image, Button } from "@chakra-ui/react";
import { Link } from "react-router-dom";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const LearnCard = ({ id, src, text, href }) => {
return (
@@ -36,7 +37,7 @@ const LearnCard = ({ id, src, text, href }) => {
>
<Image
height={"60px"}
src={`https://rubix.betadelivery.com/${src}`}
src={`${API_URL} /${src}`}
alt="company-logo"
sx={{
"@media (max-width: 600px)": {

View File

@@ -11,6 +11,7 @@ import { Link } from "react-router-dom";
import { Navigation, Pagination } from "swiper/modules";
import { Swiper, SwiperSlide } from "swiper/react";
import Chip from "../Chip/Chip";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const MobileHomeCard = ({ key, date, title, link, img, tags }) => {
return (
@@ -46,7 +47,7 @@ const MobileHomeCard = ({ key, date, title, link, img, tags }) => {
}}
>
<Image
src={`https://rubix.betadelivery.com/${img}`}
src={`${API_URL} /${img}`}
borderRadius={"10px"}
/>
<Box padding={"1rem"}>

View File

@@ -4,6 +4,7 @@
import { Box, Button, Container, Text } from "@chakra-ui/react";
import banner from "../../assets/images/communityBanner.webp";
import { useGetCommunitiesBannerQuery } from "../../Redux/slice/communityBannerSlice";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const BannerContent = [
{
@@ -39,7 +40,7 @@ const CommunityBanner = ({ onClick }) => {
<Box
key={item.id}
height={"100vh"}
backgroundImage={`url(https://rubix.betadelivery.com/${item.banner_image})`}
backgroundImage={`url(${API_URL} /${item.banner_image})`}
backgroundRepeat={"no-repeat"}
backgroundSize={"cover"}
display={"grid"}

View File

@@ -29,6 +29,7 @@ import { useEffect } from "react";
import axios from "axios";
import { useGetCommunitiesQuery } from "../../Redux/slice/communitySlice";
import Loader from "../Loader/Loader";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const individuals = [
{
@@ -197,7 +198,7 @@ const CommunityCard = () => {
description={item.description}
designation={item.designation}
name={item.member_name}
img={`https://rubix.betadelivery.com/${item.profile_image}`}
img={`${API_URL} /${item.profile_image}`}
link={item.linkedin}
/>
))}

View File

@@ -4,6 +4,7 @@ import banner from "../../assets/images/EcoBanner.png";
import { Link } from "react-router-dom";
import Loader from "../Loader/Loader";
import { useGetEcoSystemQuery } from "../../Redux/slice/ecosystemSlice";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const BannerContent = [
{
@@ -44,7 +45,7 @@ const EcoBanner = () => {
<Box
key={item.id}
height={"100vh"}
backgroundImage={`url(https://rubix.betadelivery.com/${item.banner_image})`}
backgroundImage={`url(${API_URL} /${item.banner_image})`}
backgroundRepeat={"no-repeat"}
backgroundSize={"cover"}
display={"grid"}

View File

@@ -20,6 +20,7 @@ import { Link, useParams } from "react-router-dom";
import NotFound from "../../pages/NotFound";
import { useGetEventsViewQuery } from "../../Redux/slice/eventsViewSlice";
import Loader from "../Loader/Loader";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const EventsInternal = () => {
const { data, isLoading } = useGetEventsViewQuery();
@@ -177,7 +178,7 @@ const EventsInternal = () => {
}}
>
<Image
src={`https://rubix.betadelivery.com/${matchingEvents.banner_image}`}
src={`${API_URL} /${matchingEvents.banner_image}`}
/>
</Box>
{/* Content */}

View File

@@ -5,6 +5,7 @@ import { Autoplay, Navigation, Pagination } from "swiper/modules";
import { Link } from "react-router-dom";
import { useGetEventsViewQuery } from "../../Redux/slice/eventsViewSlice";
import Loader from "../Loader/Loader";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const NewestEvent = () => {
const { data, isLoading, error } = useGetEventsViewQuery();
@@ -83,7 +84,7 @@ const NewestEvent = () => {
>
<Box>
<Image
src={`https://rubix.betadelivery.com/${item.banner_image}`}
src={`${API_URL} /${item.banner_image}`}
maxW={"418px"}
minH={"280px"}
objectFit={"cover"}

View File

@@ -6,6 +6,7 @@ import banner from "../../assets/images/bannerBgC.gif";
import { Link } from "react-router-dom";
import { useGetHomePageQuery } from "../../Redux/slice/homeSlice";
import Loader from "../Loader/Loader";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const BannerContent = [
{
@@ -47,7 +48,7 @@ const HomeBanner = () => {
<Box
key={item.id}
height={"100vh"}
backgroundImage={`url(https://rubix.betadelivery.com/${item.banner_image})`}
backgroundImage={`url(${API_URL} /${item.banner_image})`}
loading="lazy"
backgroundRepeat={"no-repeat"}
backgroundSize={"cover"}

View File

@@ -5,6 +5,7 @@ import banner from "../../assets/images/learnBanner.webp";
import { Link } from "react-router-dom";
import Loader from "../Loader/Loader";
import { useGetLearnPageQuery } from "../../Redux/slice/learPageSlice";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const BannerContent = [
{
@@ -50,7 +51,7 @@ const LearnBanner = () => {
<Box
key={item.id}
height={"100vh"}
backgroundImage={`url(https://rubix.betadelivery.com/${item.banner_image})`}
backgroundImage={`url(${API_URL} /${item.banner_image})`}
backgroundRepeat={"no-repeat"}
loading="lazy"
backgroundSize={"cover"}

View File

@@ -21,6 +21,7 @@ import imgtweleve from "../../assets/images/vivek.jpeg";
import { Pagination, Navigation } from "swiper/modules";
import { Link } from "react-router-dom";
import { useGetCommunitiesQuery } from "../../Redux/slice/communitySlice";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const individuals = [
{
@@ -230,7 +231,7 @@ const MobileCommunityCard = () => {
}}
>
<Image
src={`https://rubix.betadelivery.com/${item.profile_image}`}
src={`${API_URL} /${item.profile_image}`}
sx={{
"@media (max-width: 820px)": {
height: "auto",

View File

@@ -37,6 +37,7 @@ import news from "../../assets/images/Navicons/news.png";
import events from "../../assets/images/Navicons/events.png";
import resources from "../../assets/images/Navicons/resources.png";
import { useGetUseCaseQuery } from "../../Redux/slice/useCaseSlice";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const NavBar = () => {
const [isScrolled, setIsScrolled] = useState(false);
@@ -536,7 +537,7 @@ const NavBar = () => {
marginBottom={"1rem"}
>
<Image
src={`https://rubix.betadelivery.com/${slug.icon}`}
src={`${API_URL} /${slug.icon}`}
width={`${iconwidth}`}
height={"50px"}
borderRadius={"50%"}

View File

@@ -10,6 +10,7 @@ import Chip from "../Chip/Chip";
import { Link, useParams } from "react-router-dom";
import Loader from "../Loader/Loader";
import { useGetNewsInternalQuery } from "../../Redux/slice/NewsInternalSlice";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const NewsInternalPage = () => {
const { title_slug } = useParams();
@@ -125,7 +126,7 @@ const NewsInternalPage = () => {
<Avatar
size="lg"
name="Dan Abrahmov"
src={`https://rubix.betadelivery.com/${matchingNewsPost.profile_image}`}
src={`${API_URL} .profile_image}`}
/>
<Box
@@ -145,7 +146,7 @@ const NewsInternalPage = () => {
<Box
height={"70vh"}
width={"85vw"}
backgroundImage={`url(https://rubix.betadelivery.com/${matchingNewsPost.banner_image})`}
backgroundImage={`url(${API_URL} .banner_image})`}
backgroundRepeat={"no-repeat"}
backgroundSize={"cover"}
position="relative"

View File

@@ -6,6 +6,7 @@ import { useState } from "react";
import Pagination from "../Pagination/Pagination";
import { useGetNewsQuery } from "../../Redux/slice/newsSlice";
import Loader from "../Loader/Loader";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const contents = [
{
@@ -159,7 +160,7 @@ const NewsContent = () => {
}}
>
<Image
src={`https://rubix.betadelivery.com/${content.banner_image}`}
src={`${API_URL} /${content.banner_image}`}
height={"240px"}
width={"100%"}
objectFit={"cover"}

View File

@@ -7,6 +7,7 @@ import Loader from "../../Loader/Loader";
import { Swiper, SwiperSlide } from "swiper/react";
import { Autoplay, Navigation, Pagination } from "swiper/modules";
import { Link } from "react-router-dom";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const TabsArticles = () => {
const [currentPage, setCurrentPage] = useState(1);
@@ -71,7 +72,7 @@ const TabsArticles = () => {
>
<Box>
<Image
src={`https://rubix.betadelivery.com/${item.content_image_large}`}
src={`${API_URL} /${item.content_image_large}`}
maxW={"418px"}
minH={"280px"}
objectFit={"cover"}

View File

@@ -14,6 +14,7 @@ import Loader from "../../Loader/Loader";
import { useGetVideoQuery } from "../../../Redux/slice/whitePaperSlice";
import { useState } from "react";
import { Link } from "react-router-dom";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const videoTab = [
{
@@ -127,7 +128,7 @@ const TabsVideo = () => {
>
<Box>
<Image
src={`https://rubix.betadelivery.com/${item.thumbnail}`}
src={`${API_URL} /${item.thumbnail}`}
maxW={"418px"}
minH={"280px"}
objectFit={"cover"}

View File

@@ -6,6 +6,7 @@ import pdf from "../../../assets/pdf/Rubix.pdf";
import { useState } from "react";
import { useGetWhitePaperQuery } from "../../../Redux/slice/whitePaperSlice";
import Loader from "../../Loader/Loader";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const WhitepaperDocs = () => {
const [currentPage, setCurrentPage] = useState(1);
@@ -67,7 +68,7 @@ const WhitepaperDocs = () => {
}}
>
<Image
src={`https://rubix.betadelivery.com/${item.bannerImage}`}
src={`${API_URL} /${item.bannerImage}`}
maxHeight={"215px"}
width={"100%"}
objectFit={"contain"}
@@ -108,7 +109,7 @@ const WhitepaperDocs = () => {
></Box>
<a
download="RubiX_WhitePaper.pdf"
href={`https://rubix.betadelivery.com/${item.document}`}
href={`${API_URL} /${item.document}`}
>
<Button
position={"relative"}

View File

@@ -6,6 +6,7 @@ import { useState } from "react";
import Pagination from "../../Pagination/Pagination";
import Loader from "../../Loader/Loader";
import { useGetBlogQuery } from "../../../Redux/slice/blogsSlice";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const contents = [
{
@@ -147,7 +148,7 @@ const ArticlesTable = () => {
<Image
minH={"180px"}
objectFit={"cover"}
src={`https://rubix.betadelivery.com/${content.content_image_large}`}
src={`${API_URL} /${content.content_image_large}`}
/>
<Box padding={"1rem"}>
<Text

View File

@@ -6,6 +6,7 @@ import { useState } from "react";
import Pagination from "../../Pagination/Pagination";
import Loader from "../../Loader/Loader";
import { useGetVideoQuery } from "../../../Redux/slice/whitePaperSlice";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const contents = [
{
@@ -134,7 +135,7 @@ const VideoTable = () => {
width={"100%"}
objectFit={"cover"}
maxHeight={"180px"}
src={`https://rubix.betadelivery.com/${content.thumbnail}`}
src={`${API_URL} /${content.thumbnail}`}
/>
<Box padding={"1rem 0"}>
<Text

View File

@@ -9,6 +9,7 @@ import { useGetUseCaseQuery } from "../../Redux/slice/useCaseSlice";
import Loader from "../Loader/Loader";
import NotFound from "../../pages/NotFound";
import img from "../../assets/images/pdfscreen.png";
const API_URL = import.meta.env.VITE_API_BASE_URL;
// eslint-disable-next-line react/prop-types
const NewUseCase = () => {
@@ -41,7 +42,7 @@ const NewUseCase = () => {
<Box
height={"75vh"}
width={"100%"}
backgroundImage={`url(https://rubix.betadelivery.com/${matchingUseCase.bannerImage})`}
backgroundImage={`url(${API_URL} /${matchingUseCase.bannerImage})`}
backgroundRepeat={"no-repeat"}
backgroundSize={"cover"}
position="relative"
@@ -246,7 +247,7 @@ const NewUseCase = () => {
{
<a
download={item.originalname}
href={`https://rubix.betadelivery.com/${item.path}`}
href={`${API_URL} /${item.path}`}
target="_blank"
>
<Button

View File

@@ -5,6 +5,7 @@ import { useGetTermsPageQuery } from "../Redux/slice/termsSlice";
import { useEffect } from "react";
import Loader from "../components/Loader/Loader";
import { useGetPrivacyPageQuery } from "../Redux/slice/privacySlice";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const Policy = () => {
const { data, isLoading } = useGetPrivacyPageQuery();
@@ -31,7 +32,7 @@ const Policy = () => {
key={item.id}
height={"75vh"}
width={"100%"}
backgroundImage={`url(https://rubix.betadelivery.com/${item.banner_image})`}
backgroundImage={`url(${API_URL} /${item.banner_image})`}
backgroundRepeat={"no-repeat"}
backgroundSize={"cover"}
position="relative"

View File

@@ -4,6 +4,7 @@ import { Link } from "react-router-dom";
import { useGetTermsPageQuery } from "../Redux/slice/termsSlice";
import { useEffect } from "react";
import Loader from "../components/Loader/Loader";
const API_URL = import.meta.env.VITE_API_BASE_URL;
const Terms = () => {
const { data, isLoading } = useGetTermsPageQuery();
@@ -30,7 +31,7 @@ const Terms = () => {
key={item.id}
height={"75vh"}
width={"100%"}
backgroundImage={`url(https://rubix.betadelivery.com/${item.banner_image})`}
backgroundImage={`url(${API_URL} /${item.banner_image})`}
backgroundRepeat={"no-repeat"}
backgroundSize={"cover"}
position="relative"