Back To Home Page
diff --git a/src/app/(main)/testimonials/page.tsx b/src/app/(main)/testimonials/page.tsx
deleted file mode 100644
index b580993..0000000
--- a/src/app/(main)/testimonials/page.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import { BeforeFooterBlock } from "@/components/Blocks/BeforeFooter";
-import { GoogleReviewsBlock } from "@/components/Blocks/GoogleReviews";
-import { GoogleReviewsSkeleton } from "@/components/Blocks/GoogleReviews/GoogleReviews";
-import Image from "next/image";
-import { Suspense } from "react";
-
-export const metadata = {
- title: "Testimonials - Cochise Oncology",
- description: "Testimonials - Cochise Oncology",
-};
-
-export default async function TestimonialsPage() {
- return (
- <>
-
- {/* */}
-
-
-
- {/* */}
-
-
-
-
-
Testimonials
-
-
-
-
-
- }>
-
-
-
-
- >
- );
-}
diff --git a/src/blocks/GoogleReview.ts b/src/blocks/GoogleReview.ts
new file mode 100644
index 0000000..7fb12de
--- /dev/null
+++ b/src/blocks/GoogleReview.ts
@@ -0,0 +1,7 @@
+import { Block } from "payload";
+
+export const GoogleReviewBlock: Block = {
+ slug: "googleReviewBlock",
+ labels: { plural: "Google Reviews", singular: "Google Reviews" },
+ fields: [],
+};
diff --git a/src/collections/Pages.ts b/src/collections/Pages.ts
index a47de6d..1287427 100644
--- a/src/collections/Pages.ts
+++ b/src/collections/Pages.ts
@@ -1,6 +1,7 @@
import { BeforeFooterBlock } from "@/blocks/BeforeFooter";
import { BoxMenuGridBlock } from "@/blocks/BoxMenuGrid";
import { ContentBlock } from "@/blocks/Content";
+import { GoogleReviewBlock } from "@/blocks/GoogleReview";
import { HorizontalImageContentBlock } from "@/blocks/HorizontalImageContent";
import { ImageSliderBlock } from "@/blocks/ImageSlider";
import { OurTeamBlock } from "@/blocks/OurTeam";
@@ -45,6 +46,7 @@ export const Pages: CollectionConfig = {
HorizontalImageContentBlock,
ImageSliderBlock,
BoxMenuGridBlock,
+ GoogleReviewBlock,
],
},
{
diff --git a/src/components/Blocks/GoogleReviews/index.tsx b/src/components/Blocks/GoogleReviews/index.tsx
index 750b0ff..5f6e540 100644
--- a/src/components/Blocks/GoogleReviews/index.tsx
+++ b/src/components/Blocks/GoogleReviews/index.tsx
@@ -1,51 +1,6 @@
import { fetchGoogleReviews } from "@/services/payload/google-reviews";
import { GoogleReviewProps, GoogleReviews } from "./GoogleReviews";
-// const data: CardStarRatingProps["data"][] = [
-// {
-// star: 5,
-// description:
-// "Today i did my cat scan , and met Raymond, he radiates hope and good will, i then met Larry who showed me the hospitality suite, i was overwhelmed by thier kindness, every one i have met so far has been truly amazing.while at physical therapy the doc said i had made a wise",
-// },
-// {
-// star: 5,
-// description: "Great and caring service. Completely satisfied.",
-// },
-// {
-// star: 5,
-// description: "Sincere and caring attitude...very professional and inspires confidence.",
-// },
-// {
-// star: 5,
-// description:
-// "I've been going to cochise oncology for many years and everyone is always professional and take the time to explain everything",
-// },
-// {
-// star: 5,
-// description: "One fine person\n Very concerning. Glad to see her",
-// },
-// {
-// star: 5,
-// description:
-// "Barbara was very professional and friendly. She shared all info with me and gave me a copy of my lab results.",
-// },
-// {
-// star: 5,
-// description:
-// "Barbara is great! She listens and ask questions on other issues outside her area just to be sure you’re well taken care of.",
-// },
-// {
-// star: 5,
-// description:
-// "Today, at Cochise Oncology, I had an appointment with Dr. Reid Culton. He explained in great detail from the medical chart of the blood work and listen to my concerns. Dr. Reid Culton also answered my questions in great detail. Thank you.",
-// },
-// {
-// star: 5,
-// description:
-// "I absolutely love the people that work at this place. From the front desk to radiation room. Everyone is loving and caring.",
-// },
-// ];
-
export async function GoogleReviewsBlock() {
const data = await fetchGoogleReviews();
if (!data?.id) return <>>;
diff --git a/src/components/Blocks/HorizontalImageContent/index.tsx b/src/components/Blocks/HorizontalImageContent/index.tsx
index e1c7faf..60600cd 100644
--- a/src/components/Blocks/HorizontalImageContent/index.tsx
+++ b/src/components/Blocks/HorizontalImageContent/index.tsx
@@ -8,7 +8,7 @@ export interface HorizontalImageContentBlockProps {
export function HorizontalImageContentBlock({ img, content }: HorizontalImageContentBlockProps) {
return (
-
+
diff --git a/src/components/Blocks/RenderBlocks.tsx b/src/components/Blocks/RenderBlocks.tsx
index 99bcaf1..175c76e 100644
--- a/src/components/Blocks/RenderBlocks.tsx
+++ b/src/components/Blocks/RenderBlocks.tsx
@@ -1,4 +1,4 @@
-import React, { Fragment } from "react";
+import React, { Fragment, Suspense } from "react";
import type { Page } from "@/payload-types";
import { ContentBlock } from "./Content";
@@ -7,6 +7,8 @@ import { OurTeamBlock } from "./OurTeam";
import { HorizontalImageContentBlock } from "./HorizontalImageContent";
import { ImageSliderBlock } from "./ImageSlider";
import { BoxMenuGridBlock } from "./BoxMenuGrid";
+import { GoogleReviewsBlock } from "./GoogleReviews";
+import { GoogleReviewsSkeleton } from "./GoogleReviews/GoogleReviews";
const blockComponents = {
contentBlock: ContentBlock,
@@ -15,6 +17,7 @@ const blockComponents = {
horizontalImageContentBlock: HorizontalImageContentBlock,
imageSliderBlock: ImageSliderBlock,
boxMenuGridBlock: BoxMenuGridBlock,
+ googleReviewBlock: GoogleReviewsBlock,
};
export const RenderBlocks: React.FC<{
@@ -32,10 +35,26 @@ export const RenderBlocks: React.FC<{
if (blockType && blockType in blockComponents) {
const Block = blockComponents[blockType];
+ if (!Block) return null;
- if (Block) {
+ if (blockType === "googleReviewBlock") {
+ return (
+