LLC/src/view/Landing/index.jsx

70 lines
1.5 KiB
React
Raw Normal View History

2025-02-19 15:04:53 +03:30
import Navbar from "src/components/NavBar";
2025-02-16 09:06:54 +03:30
import AboutUs from "./components/AboutUs";
import Footer from "./components/Footer";
2025-02-19 15:04:53 +03:30
import Products from "./components/Products";
import Sides from "./components/Sides";
2025-02-19 16:11:53 +03:30
import graphql from "src/utils/graphql";
2025-02-16 09:06:54 +03:30
2025-02-19 16:11:53 +03:30
const gql = `
query Products_connection($locale: I18NLocaleCode, $page: Int, $pageSize: Int) {
products_connection(
pagination: { page: $page, pageSize: $pageSize }
locale: $locale,
sort: ["createdAt:asc"]
) {
nodes {
title
documentId
images {
alternativeText
documentId
url
}
category {
documentId
title
slug
}
brand {
title
documentId
slug
}
slug
}
}
}
`
const getProducts = async () => {
const products = await graphql(gql, {
page: 1,
pageSize: 20,
locale: "en"
})
return products.products_connection.nodes;
}
const Landing = async () => {
const products = await getProducts()
console.log(products)
2025-02-16 09:06:54 +03:30
return (
<div className=" text-center text-6xl">
{" "}
<Navbar theme={1} />
2025-02-17 04:52:48 +03:30
{/* <HeroSection /> */}
2025-02-16 09:06:54 +03:30
<AboutUs />
2025-02-19 16:11:53 +03:30
<Sides />
2025-02-19 15:04:53 +03:30
{/* <CounterDetail /> */}
2025-02-19 16:11:53 +03:30
<Products products={products} />
2025-02-19 15:04:53 +03:30
{/* <WhyHorizon/> */}
2025-02-16 09:06:54 +03:30
<Footer />
</div>
);
};
export default Landing;