LLC/src/view/Landing/index.jsx

55 lines
1.0 KiB
JavaScript

import Navbar from "src/components/NavBar";
import AboutUs from "./components/AboutUs";
import Footer from "./components/Footer";
import Products from "./components/Products";
import Sides from "./components/Sides";
import graphql from "src/utils/graphql";
import CounterDetail from "./components/CounterDetail";
import { getLocale } from "next-intl/server";
const gql_stats = `
query Stats($locale:I18NLocaleCode) {
stats(locale: $locale) {
title
stat
subtitle
documentId
}
}
`
const getStats = async () => {
const locale = await getLocale()
console.log("locale", locale)
const stats = await graphql(gql_stats, {
locale: locale
})
return stats.stats
}
const Landing = async () => {
const stats = await getStats()
return (
<div className=" text-center text-6xl">
{" "}
{/* <HeroSection /> */}
<AboutUs />
<Sides />
<CounterDetail stats={stats} />
<Products />
{/* <WhyHorizon/> */}
</div>
);
};
export default Landing;