mirror of
https://github.com/WDI-Ideas/rubix.git
synced 2026-04-27 17:55:50 +00:00
partner card slice api integrated
This commit is contained in:
@@ -10,7 +10,10 @@ export const learnPageApi = createApi({
|
||||
getLearnFaq: builder.query({
|
||||
query: () => 'faq/active',
|
||||
}),
|
||||
getpartnerCard: builder.query({
|
||||
query: () => 'card/active',
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
export const { useGetLearnPageQuery, useGetLearnFaqQuery } = learnPageApi;
|
||||
export const { useGetLearnPageQuery, useGetLearnFaqQuery, useGetpartnerCardQuery } = learnPageApi;
|
||||
|
||||
@@ -37,7 +37,7 @@ const store = configureStore({
|
||||
learnPageApi.middleware,
|
||||
homePageApi.middleware,
|
||||
eventsViewApi.middleware,
|
||||
useCaseApi.middleware
|
||||
useCaseApi.middleware,
|
||||
), // Add blogApi.middleware here
|
||||
});
|
||||
|
||||
|
||||
@@ -3,6 +3,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 BannerContent = [
|
||||
{
|
||||
@@ -18,7 +19,14 @@ const BannerContent = [
|
||||
},
|
||||
];
|
||||
|
||||
const BuildBanner = ({ data }) => {
|
||||
const BuildBanner = ({ data, isLoading }) => {
|
||||
if (isLoading) {
|
||||
return (
|
||||
<div>
|
||||
<Loader />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<>
|
||||
{data?.map((item) => (
|
||||
@@ -29,7 +37,9 @@ const BuildBanner = ({ data }) => {
|
||||
backgroundRepeat={"no-repeat"}
|
||||
backgroundSize={"cover"}
|
||||
display={"grid"}
|
||||
placeContent={"center"}
|
||||
// placeContent={"center"}
|
||||
alignContent={"center"}
|
||||
justifyContent={"start"}
|
||||
sx={{
|
||||
"@media (max-width: 1024px)": {
|
||||
height: "70vh",
|
||||
@@ -49,8 +59,11 @@ const BuildBanner = ({ data }) => {
|
||||
maxW="container.xl"
|
||||
textAlign={"left"}
|
||||
marginTop={"2rem"}
|
||||
paddingLeft={"3.5rem"}
|
||||
paddingLeft={"6.5rem"}
|
||||
sx={{
|
||||
"@media (max-width: 1024px)": {
|
||||
paddingLeft: "2.5rem", // Correctly target paddingLeft instead of padding
|
||||
},
|
||||
"@media (max-width: 500px)": {
|
||||
paddingLeft: "1rem", // Correctly target paddingLeft instead of padding
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { Box, Container, Text, Image, Button } from "@chakra-ui/react";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
const LearnCard = ({ id, src, alt, text, href }) => {
|
||||
const LearnCard = ({ id, src, text, href }) => {
|
||||
return (
|
||||
<Box padding={"1px"} borderRadius={"10px"}>
|
||||
{/* {images.map((img) => (
|
||||
@@ -36,8 +36,8 @@ const LearnCard = ({ id, src, alt, text, href }) => {
|
||||
>
|
||||
<Image
|
||||
height={"60px"}
|
||||
src={src}
|
||||
alt={alt}
|
||||
src={`https://rubix.betadelivery.com/${src}`}
|
||||
alt="company-logo"
|
||||
sx={{
|
||||
"@media (max-width: 600px)": {
|
||||
height: "40px",
|
||||
@@ -46,7 +46,8 @@ const LearnCard = ({ id, src, alt, text, href }) => {
|
||||
/>
|
||||
</Box>
|
||||
|
||||
<Box padding={"1rem"}
|
||||
<Box
|
||||
padding={"1rem"}
|
||||
sx={{
|
||||
"@media (max-width: 500px)": {
|
||||
padding: "1rem 0px",
|
||||
|
||||
@@ -56,8 +56,11 @@ const CommunityBanner = ({ onClick }) => {
|
||||
maxW="container.xl"
|
||||
textAlign={"left"}
|
||||
marginTop={"2rem"}
|
||||
paddingLeft={"3.5rem"}
|
||||
paddingLeft={"6.5rem"}
|
||||
sx={{
|
||||
"@media (max-width: 1024px)": {
|
||||
paddingLeft: "2.5rem", // Correctly target paddingLeft instead of padding
|
||||
},
|
||||
"@media (max-width: 500px)": {
|
||||
paddingLeft: "1rem", // Correctly target paddingLeft instead of padding
|
||||
},
|
||||
|
||||
@@ -5,6 +5,7 @@ import { useMediaQuery } from "@chakra-ui/react";
|
||||
import banner from "../../assets/images/bannerBg.gif";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useGetHomePageQuery } from "../../Redux/slice/homeSlice";
|
||||
import Loader from "../Loader/Loader";
|
||||
|
||||
const BannerContent = [
|
||||
{
|
||||
@@ -22,9 +23,17 @@ const BannerContent = [
|
||||
|
||||
const HomeBanner = () => {
|
||||
const { data, isLoading, error } = useGetHomePageQuery();
|
||||
console.log(data?.data?.data);
|
||||
console.log(data);
|
||||
const HomeBanner = data?.data?.data;
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<div>
|
||||
<Loader />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{HomeBanner?.map((item) => (
|
||||
|
||||
@@ -48,7 +48,8 @@ const LearnBanner = () => {
|
||||
loading="lazy"
|
||||
backgroundSize={"cover"}
|
||||
display={"grid"}
|
||||
placeContent={"center"}
|
||||
alignContent={"center"}
|
||||
justifyContent={"start"}
|
||||
sx={{
|
||||
"@media (max-width: 1024px)": {
|
||||
height: "70vh",
|
||||
@@ -67,8 +68,11 @@ const LearnBanner = () => {
|
||||
maxW="container.xl"
|
||||
textAlign={"left"}
|
||||
marginTop={"2rem"}
|
||||
paddingLeft={"3.5rem"}
|
||||
paddingLeft={"6.5rem"}
|
||||
sx={{
|
||||
"@media (max-width: 1024px)": {
|
||||
paddingLeft: "2.5rem", // Correctly target paddingLeft instead of padding
|
||||
},
|
||||
"@media (max-width: 500px)": {
|
||||
paddingLeft: "1rem", // Correctly target paddingLeft instead of padding
|
||||
},
|
||||
|
||||
@@ -7,6 +7,7 @@ import exr from "../../assets/images/LearnCard5.png";
|
||||
import finalo from "../../assets/images/LearnCard1.png";
|
||||
import jupiter from "../../assets/images/LearnCard3.png";
|
||||
import { useMediaQuery } from "@chakra-ui/react";
|
||||
import { useGetpartnerCardQuery } from "../../Redux/slice/learPageSlice";
|
||||
|
||||
// import { Badge } from "@chakra-ui/react";
|
||||
|
||||
@@ -55,6 +56,9 @@ const Content = {
|
||||
|
||||
const LearnDev = () => {
|
||||
const [isSmallScreen] = useMediaQuery("(max-width: 996px)");
|
||||
const { data, isLoading, error } = useGetpartnerCardQuery();
|
||||
const partnerCard = data?.data?.data;
|
||||
console.log(partnerCard);
|
||||
return (
|
||||
<Box
|
||||
// height={"100vh"}
|
||||
@@ -79,8 +83,8 @@ const LearnDev = () => {
|
||||
fontSize: "22px",
|
||||
fontWeight: "400",
|
||||
marginBottom: "30px",
|
||||
padding:'1rem',
|
||||
paddingBottom:'0px'
|
||||
padding: "1rem",
|
||||
paddingBottom: "0px",
|
||||
},
|
||||
}}
|
||||
>
|
||||
@@ -110,13 +114,13 @@ const LearnDev = () => {
|
||||
},
|
||||
}}
|
||||
>
|
||||
{content.map((item) => (
|
||||
{partnerCard?.map((item) => (
|
||||
<LearnCard
|
||||
key={item.id}
|
||||
src={item.src}
|
||||
alt={item.alt}
|
||||
text={item.text}
|
||||
href={item.href}
|
||||
src={item.company_logo}
|
||||
// alt={item.alt}
|
||||
text={item.description}
|
||||
href={item.website_link}
|
||||
/>
|
||||
))}
|
||||
</Box>
|
||||
|
||||
@@ -19,12 +19,17 @@ import { Button } from "@chakra-ui/react";
|
||||
// import { HashLink } from "react-router-hash-link";
|
||||
import logo from "../../assets/images/rubix.png";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useGetUseCaseQuery } from "../../Redux/slice/useCaseSlice";
|
||||
|
||||
export const MobileMenu = () => {
|
||||
const [isScrolled, setIsScrolled] = useState(false);
|
||||
const [menu, setMenu] = useState(false);
|
||||
const location = useLocation();
|
||||
|
||||
const { data } = useGetUseCaseQuery();
|
||||
console.log(data);
|
||||
const useCase = data?.data?.rows;
|
||||
|
||||
const handleClick = () => {
|
||||
setMenu(!menu);
|
||||
};
|
||||
@@ -247,10 +252,25 @@ export const MobileMenu = () => {
|
||||
<AccordionIcon color={"#fff"} fontSize={"28px"} />
|
||||
</AccordionButton>
|
||||
<AccordionPanel pb={4}>
|
||||
<Link to="/fin-tech" style={innerLink} onClick={handleClick}>
|
||||
FinTech
|
||||
</Link>
|
||||
<Link
|
||||
{useCase?.map((slug) => (
|
||||
<Link
|
||||
to={`/${slug.title_slug}`}
|
||||
style={{
|
||||
color:
|
||||
location.pathname === `/${slug.title_slug}`
|
||||
? "rgb(222, 133, 142)"
|
||||
: "#fff",
|
||||
display: "block",
|
||||
padding: "15px 0",
|
||||
}}
|
||||
onClick={handleClick}
|
||||
key={slug.id}
|
||||
>
|
||||
<Text>{slug.title}</Text>
|
||||
</Link>
|
||||
))}
|
||||
|
||||
{/* <Link
|
||||
to="/ad-tech"
|
||||
// target="_blank"
|
||||
// rel="noopener noreferrer"
|
||||
@@ -294,7 +314,7 @@ export const MobileMenu = () => {
|
||||
onClick={handleClick}
|
||||
>
|
||||
Telecom
|
||||
</Link>
|
||||
</Link> */}
|
||||
</AccordionPanel>
|
||||
</AccordionItem>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import MobileSolve from "../components/MobileComponent/MobileSolve";
|
||||
import { useGetBuildPageQuery } from "../Redux/slice/bannerSlice";
|
||||
|
||||
const BuildPage = () => {
|
||||
const { data } = useGetBuildPageQuery();
|
||||
const { data, isLoading } = useGetBuildPageQuery();
|
||||
const buildBanner = data?.data?.data;
|
||||
console.log(buildBanner);
|
||||
|
||||
@@ -38,7 +38,7 @@ const BuildPage = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<BuildBanner data={buildBanner} />
|
||||
<BuildBanner data={buildBanner} isLoading={isLoading} />
|
||||
<WhyBuild />
|
||||
{!isMobile ? <Solve /> : <MobileSolve />}
|
||||
{!isMobile ? <Tools /> : <ToolMobile />}
|
||||
|
||||
Reference in New Issue
Block a user