dev #14

Merged
RizqiSyahrendra merged 19 commits from dev into main 2025-03-10 17:17:37 +00:00
4 changed files with 120 additions and 11 deletions
Showing only changes of commit 86c8e2a929 - Show all commits

View File

@ -1,14 +1,21 @@
import Parallax from "./home-bg-video/page";
import Homepage from "@/components/Homepage";
import { BeforeFooterBlock } from "@/components/Blocks/BeforeFooter";
import { Metadata, Viewport } from "next";
import { getDefaultMetadata } from "@/utils/metadata";
import HomeBgVideo from "@/components/HomeBgVideo";
import { headers } from "next/headers";
export async function generateMetadata(): Promise<Metadata> {
const defaultMetadata = await getDefaultMetadata();
defaultMetadata.title = `Homepage - ${defaultMetadata.openGraph?.siteName}`;
defaultMetadata.description =
"Get compassionate care and excellent medical services from COCHISE ONCOLOGY in Sierra Vista, Arizona. We are the largest full-service cancer treatment center between Albuquerque, New Mexico and Tucson, Arizona.";
defaultMetadata.keywords = "Cochise Oncology, Oncology, Healthcare, Medical Services, Cancer Treatment";
if (!!defaultMetadata?.openGraph) {
defaultMetadata.openGraph.images = ["/assets/images/cochise-welcome.png"];
}
return defaultMetadata;
}
@ -17,10 +24,118 @@ export const viewport: Viewport = {
initialScale: 1,
};
export default function Home() {
export default async function Home() {
const headersList = await headers();
const fullUrl = headersList.get("x-full-url");
const siteName = headersList.get("x-site-name");
const jsonLd = {
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebPage",
"@id": fullUrl,
url: fullUrl,
name: `Homepage - ${siteName}`,
isPartOf: {
"@id": `${fullUrl}#website`,
},
about: {
"@id": `${fullUrl}#organization`,
},
primaryImageOfPage: {
"@id": `${fullUrl}#primaryimage`,
},
image: {
"@id": `${fullUrl}#primaryimage`,
},
thumbnailUrl: [`${fullUrl}assets/images/cochise-welcome.png`],
datePublished: "2024-07-18T16:29:29+00:00",
dateModified: "2025-02-24T21:01:50+00:00",
description:
"Get compassionate care and excellent medical services from COCHISE ONCOLOGY in Sierra Vista, Arizona. We are the largest full-service cancer treatment center between Albuquerque, New Mexico and Tucson, Arizona.",
breadcrumb: {
"@id": `${fullUrl}#breadcrumb`,
},
inLanguage: "en-US",
potentialAction: [
{
"@type": "ReadAction",
target: [fullUrl],
},
],
},
{
"@type": "ImageObject",
inLanguage: "en-US",
"@id": `${fullUrl}#primaryimage`,
url: `${fullUrl}assets/images/cochise-welcome.png`,
contentUrl: `${fullUrl}assets/images/cochise-welcome.png`,
width: 940,
height: 788,
},
{
"@type": "BreadcrumbList",
"@id": `${fullUrl}#breadcrumb`,
itemListElement: [
{
"@type": "ListItem",
position: 1,
name: "Home",
},
],
},
{
"@type": "WebSite",
"@id": `${fullUrl}#website`,
url: fullUrl,
name: siteName,
description: "",
publisher: {
"@id": `${fullUrl}#organization`,
},
potentialAction: [
{
"@type": "SearchAction",
target: {
"@type": "EntryPoint",
urlTemplate: `${fullUrl}?s={search_term_string}`,
},
"query-input": {
"@type": "PropertyValueSpecification",
valueRequired: true,
valueName: "search_term_string",
},
},
],
inLanguage: "en-US",
},
{
"@type": "Organization",
"@id": `${fullUrl}#organization`,
name: "Cochise Oncology",
url: fullUrl,
logo: {
"@type": "ImageObject",
inLanguage: "en-US",
"@id": `${fullUrl}#/schema/logo/image/`,
url: `${fullUrl}assets/images/cochise-welcome.png`,
contentUrl: `${fullUrl}assets/images/cochise-welcome.png`,
width: 500,
height: 195,
caption: siteName,
},
image: {
"@id": `${fullUrl}#/schema/logo/image/`,
},
},
],
};
return (
<>
<Parallax />
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }} />
<HomeBgVideo />
<Homepage />
<BeforeFooterBlock />
</>

View File

@ -27,7 +27,6 @@ export default async function BlogDetail({ slug }: BlogDetailProps) {
}
let author = {};
console.log("data?.data?.createdBy", data?.data?.createdBy);
if (!!data?.data?.createdBy && typeof data?.data?.createdBy !== "number") {
author = {
author: {

View File

@ -1,10 +1,6 @@
// "use client";
"use client";
import Hero from "@/components/Hero";
// const ParallaxContainer = dynamic(() => import("@/components/ParallaxContainer"), {
// ssr: false,
// });
export default function HomeBgVideo() {
return (
<>

View File

@ -17,13 +17,12 @@ export async function getDefaultMetadata(): Promise<Metadata> {
"max-snippet": -1,
"max-video-preview": -1,
},
keywords: "Cochise Oncology, Oncology, Healthcare, Medical Services, Cancer Treatment",
openGraph: {
title: siteName,
siteName,
type: "website",
locale: "en_US",
url: fullUrl,
siteName,
},
twitter: {
card: "summary_large_image",