Merge branch 'master' of bitbucket.org:ecropdev/encoach-landing-page
This commit is contained in:
@@ -9,6 +9,7 @@ export default async function Page() {
|
||||
const home: HomePage = {
|
||||
...data,
|
||||
Banner: data?.Banner?.data?.attributes,
|
||||
AdvertisementBanner: data?.AdvertisementBanner?.data?.attributes,
|
||||
};
|
||||
|
||||
return <Home data={home} language="ar" />;
|
||||
|
||||
@@ -9,6 +9,7 @@ export default async function Page() {
|
||||
const home: HomePage = {
|
||||
...data,
|
||||
Banner: data?.Banner?.data?.attributes,
|
||||
AdvertisementBanner: data?.AdvertisementBanner?.data?.attributes,
|
||||
};
|
||||
|
||||
return <Home data={home} language="en" />;
|
||||
|
||||
@@ -18,5 +18,7 @@ export async function getData<T>(page: string, locale: "ar" | "en"): Promise<T>
|
||||
headers: {Authorization: `Bearer ${process.env.STRAPI_TOKEN}`},
|
||||
});
|
||||
|
||||
console.log('GetDAta', page, JSON.stringify(request.data.data.attributes, null, 2));
|
||||
return request.data.data.attributes;
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ export async function AgentContacts({language, page, country, data}: Props) {
|
||||
const contact = (await getCountryManagers(country, language)) as Contact;
|
||||
|
||||
return (
|
||||
<main className="text-mti-black flex h-screen w-full flex-col bg-white">
|
||||
<main className="text-mti-black flex h-screen w-full flex-col bg-white" dir={language === "ar" ? "rtl" : "ltr"}>
|
||||
<Navbar currentPage={page} language={language} />
|
||||
|
||||
<section className="bg-mti-purple h-full w-full p-8 text-center text-white md:p-16">
|
||||
|
||||
@@ -20,7 +20,15 @@ export default function Home({language, data}: Props) {
|
||||
className={clsx("h-screen w-full bg-white text-mti-black flex flex-col", language === "ar" && "text-right")}
|
||||
dir={language === "ar" ? "rtl" : "ltr"}>
|
||||
<Navbar currentPage="/" language={language} />
|
||||
|
||||
{data.AdvertisementBanner?.url && (
|
||||
<section className="w-full relative bg-white mb-4">
|
||||
<img
|
||||
src={data.AdvertisementBanner.url}
|
||||
alt={data.AdvertisementBanner.alternativeText || 'Advertisement Banner'}
|
||||
className="w-full"
|
||||
/>
|
||||
</section>
|
||||
)}
|
||||
<section className="w-full relative bg-white">
|
||||
<img
|
||||
src={data.Banner?.url || "/banner_encoach_home.png"}
|
||||
|
||||
@@ -14,10 +14,12 @@ interface Base {
|
||||
|
||||
export default interface HomePage extends Base {
|
||||
Banner: Image;
|
||||
AdvertisementBanner: Image;
|
||||
}
|
||||
|
||||
export interface HomePageData extends Base {
|
||||
Banner: ImageData;
|
||||
AdvertisementBanner: ImageData;
|
||||
}
|
||||
|
||||
interface Modules {
|
||||
|
||||
Reference in New Issue
Block a user