diff --git a/package.json b/package.json
index a4c6bef..02396c4 100644
--- a/package.json
+++ b/package.json
@@ -9,8 +9,8 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
- "payload": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload",
"payload:generate:types": "payload generate:types",
+ "payload:generate:importMap": "payload generate:importMap",
"tsc": "tsc"
},
"dependencies": {
@@ -69,4 +69,4 @@
"typescript": "^5"
},
"packageManager": "yarn@4.6.0"
-}
+}
\ No newline at end of file
diff --git a/src/app/(payload)/admin/importMap.js b/src/app/(payload)/admin/importMap.js
index 2172f9e..f9eae4d 100644
--- a/src/app/(payload)/admin/importMap.js
+++ b/src/app/(payload)/admin/importMap.js
@@ -22,6 +22,7 @@ import { BoldFeatureClient as BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864
import { ItalicFeatureClient as ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
import { FixedToolbarFeatureClient as FixedToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
import { default as default_382980007b1adf7b8e8832707f1169fb } from '@/components/Logo/AdminLogo'
+import { S3ClientUploadHandler as S3ClientUploadHandler_f97aa6c64367fa259c5bc0567239ef24 } from '@payloadcms/storage-s3/client'
export const importMap = {
"@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell": RscEntryLexicalCell_44fe37237e0ebf4470c9990d8cb7b07e,
@@ -47,5 +48,6 @@ export const importMap = {
"@payloadcms/richtext-lexical/client#BoldFeatureClient": BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
"@payloadcms/richtext-lexical/client#ItalicFeatureClient": ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
"@payloadcms/richtext-lexical/client#FixedToolbarFeatureClient": FixedToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
- "/components/Logo/AdminLogo#default": default_382980007b1adf7b8e8832707f1169fb
+ "/components/Logo/AdminLogo#default": default_382980007b1adf7b8e8832707f1169fb,
+ "@payloadcms/storage-s3/client#S3ClientUploadHandler": S3ClientUploadHandler_f97aa6c64367fa259c5bc0567239ef24
}
diff --git a/src/components/Blocks/Contact/index.tsx b/src/components/Blocks/Contact/index.tsx
index 85069be..95f869a 100644
--- a/src/components/Blocks/Contact/index.tsx
+++ b/src/components/Blocks/Contact/index.tsx
@@ -1,5 +1,7 @@
import { fetchContact } from "@/services/payload/contact";
import { Suspense } from "react";
+import { FaClock, FaFax, FaMapMarkerAlt } from "react-icons/fa";
+import { GiRotaryPhone } from "react-icons/gi";
export default function ContactBlock() {
return (
@@ -31,22 +33,8 @@ async function ContactWithData() {
{/* Contact Item */}
-
-
-
+
+
Location
@@ -60,21 +48,8 @@ async function ContactWithData() {
{/* End Contact Item */}
{/* Contact Item */}
-
-
+
+
Phone
@@ -88,21 +63,8 @@ async function ContactWithData() {
{/* Contact Item */}
-
-
+
+
Hours
{Array.isArray(contact?.hours) &&
@@ -117,21 +79,8 @@ async function ContactWithData() {
{/* End Contact Item */}
{/* Contact Item */}
-
-
+
+
Fax
@@ -182,21 +131,7 @@ function ContactSkeleton() {
{/* Contact Item */}
@@ -205,20 +140,7 @@ function ContactSkeleton() {
{/* Contact Item */}
@@ -229,20 +151,7 @@ function ContactSkeleton() {
{/* Contact Item */}
@@ -251,20 +160,7 @@ function ContactSkeleton() {
{/* Contact Item */}
diff --git a/src/components/Blocks/Form/index.tsx b/src/components/Blocks/Form/index.tsx
index 52c28e4..9abc227 100644
--- a/src/components/Blocks/Form/index.tsx
+++ b/src/components/Blocks/Form/index.tsx
@@ -89,7 +89,7 @@ export const FormBlock: React.FC<
}, 250);
try {
- const req = await fetch(`${process.env.NEXT_PUBLIC_PAYLOAD_URL}/api/form-submissions`, {
+ const req = await fetch(`/api/form-submissions`, {
body: JSON.stringify({
form: formID,
submissionData: dataToSend,
@@ -140,7 +140,7 @@ export const FormBlock: React.FC<
);
return (
-
+
{!!enableIntro && introContent && !hasSubmitted &&
}
{!isLoading && hasSubmitted && confirmationType === "message" &&
}
diff --git a/src/components/Blocks/RenderBlocks.tsx b/src/components/Blocks/RenderBlocks.tsx
index 277a987..f6052d8 100644
--- a/src/components/Blocks/RenderBlocks.tsx
+++ b/src/components/Blocks/RenderBlocks.tsx
@@ -51,7 +51,7 @@ export const RenderBlocks: React.FC<{
);
} else if (blockType === "formBlock") {
return (
-
+
- }>
-
-
- >
- );
-}
-
-async function ContactWithData() {
- const contact = await fetchContact();
-
- return (
-
-
-
-
- {/* Contact Form */}
-
- {/* Contact Item */}
-
- {/* End Contact Item */}
- {/* Contact Item */}
-
- {/* End Contact Item */}
-
-
- {/* Contact Item */}
-
-
-
-
Hours
-
- {Array.isArray(contact?.hours) &&
- contact.hours.map((h) => (
-
- {h.hour ?? ""}
-
- ))}
-
-
-
- {/* End Contact Item */}
- {/* Contact Item */}
-
- {/* End Contact Item */}
-
- {/* End Contact Form */}
-
-
- {/* Google Map */}
-
-
-
- {/* End Google Map */}
-
-
-
- );
-}
-
-function ContactSkeleton() {
- return (
-
-
-
-
- {/* Contact Form */}
-
- {/* Contact Item */}
-
- {/* End Contact Item */}
- {/* Contact Item */}
-
- {/* End Contact Item */}
-
-
- {/* Contact Item */}
-
- {/* End Contact Item */}
- {/* Contact Item */}
-
- {/* End Contact Item */}
-
- {/* End Contact Form */}
-
-
- {/* Google Map */}
-
- {/* End Google Map */}
-
-
-
- );
-}
diff --git a/src/components/Contacts/ContactForm.tsx b/src/components/Contacts/ContactForm.tsx
deleted file mode 100644
index 183ca32..0000000
--- a/src/components/Contacts/ContactForm.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import { fetchForm } from "@/services/payload/form";
-import { FormBlock } from "@/components/Blocks/Form";
-
-export default async function ContactForm() {
- const form = await fetchForm(1);
-
- if (!form) return <>>;
-
- return (
-
-
{form?.title ?? ""}
-
-
-
-
- );
-}
diff --git a/src/components/Homepage.tsx b/src/components/Homepage.tsx
index bfd74e9..7519501 100644
--- a/src/components/Homepage.tsx
+++ b/src/components/Homepage.tsx
@@ -1,8 +1,8 @@
import Image from "next/image";
import Link from "next/link";
import About from "./About";
-import Contact from "./Contacts/Contact";
import Testimonials from "./Testimonials";
+import ContactBlock from "./Blocks/Contact";
export default function homepage({ dark = false }) {
return (
@@ -179,7 +179,9 @@ export default function homepage({ dark = false }) {
>
);