Build Your Kit page and full Micromelon website

Complete website build including:
- Build Your Kit store page with cart system, sectioned layout
  (Hardware, Software, Attachments, Spare Parts), inline quote
  request form, and sticky sidebar summary
- 16+ pages: Education, Platform, Resources, News, About Us,
  Download, Contact, Rover, Code Editor, Robot Simulator, etc.
- 89+ MDX resource articles and 18 news posts
- Store product images scraped from micromelon.com.au
- Quote request API route with Airtable integration
- Dynamic back links and cover photos on resource pages
- Redesigned downloads page
- Fixed corrupted MDX code blocks
This commit is contained in:
Tim Hadwen
2026-02-28 19:00:42 +10:00
parent 5233233662
commit 707c49dd3f
320 changed files with 22333 additions and 107 deletions

View File

@@ -0,0 +1,113 @@
"use client";
import { useState } from "react";
import { Container } from "@/components/layout/Container";
import { Button } from "@/components/ui/Button";
import { FormField } from "@/components/ui/FormField";
export default function ContactForm() {
const [name, setName] = useState("");
const [email, setEmail] = useState("");
const [phone, setPhone] = useState("");
const [institution, setInstitution] = useState("");
const [message, setMessage] = useState("");
const [submitted, setSubmitted] = useState(false);
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
// POST to /api/contact will be built later
setSubmitted(true);
};
if (submitted) {
return (
<section className="bg-white py-16 sm:py-24">
<Container>
<div className="mx-auto max-w-2xl text-center">
<h1 className="text-3xl font-bold tracking-tight text-foreground sm:text-4xl">
Thank you!
</h1>
<p className="mt-4 text-lg text-foreground-light">
Your message has been sent.
</p>
</div>
</Container>
</section>
);
}
return (
<section className="bg-white py-16 sm:py-24">
<Container>
<div className="mx-auto max-w-2xl">
<div className="mb-12">
<h1 className="text-3xl font-bold tracking-tight text-foreground sm:text-4xl">
Contact us.
</h1>
<p className="mt-4 text-foreground-light">
Email:{" "}
<a
href="mailto:contact@micromelon.com.au"
className="text-brand-dark underline hover:text-foreground"
>
contact@micromelon.com.au
</a>
</p>
</div>
<form onSubmit={handleSubmit} className="space-y-6">
<FormField
label="Your Name"
name="name"
type="text"
required
placeholder="Your full name"
value={name}
onChange={(e) => setName(e.target.value)}
/>
<FormField
label="Email"
name="email"
type="email"
required
placeholder="you@example.com"
value={email}
onChange={(e) => setEmail(e.target.value)}
/>
<FormField
label="Phone Number"
name="phone"
type="tel"
placeholder="Your phone number"
value={phone}
onChange={(e) => setPhone(e.target.value)}
/>
<FormField
label="Institution/Organisation"
name="institution"
type="text"
placeholder="Your institution or organisation"
value={institution}
onChange={(e) => setInstitution(e.target.value)}
/>
<FormField
label="Message"
name="message"
type="textarea"
required
placeholder="How can we help?"
value={message}
onChange={(e) => setMessage(e.target.value)}
/>
<div>
<Button type="submit" variant="primary">
SEND
</Button>
</div>
</form>
</div>
</Container>
</section>
);
}