Launch auto parts marketplace with search and quote features#4
Launch auto parts marketplace with search and quote features#4auapwllc-dev wants to merge 26 commits into
Conversation
Add dark/light theme, auto parts catalog, search, quote system, and FormSubmit.co integration. Co-authored-by: AUAPW LLC <266437609+auapwllc-dev@users.noreply.github.com>
Add refined theme, enhanced animations, and better typography. Co-authored-by: AUAPW LLC <266437609+auapwllc-dev@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Only show logo image when uploaded, remove text overlay. Co-authored-by: AUAPW LLC <266437609+auapwllc-dev@users.noreply.github.com>
Transparent logo area replaces green header background. Co-authored-by: AUAPW LLC <266437609+auapwllc-dev@users.noreply.github.com>
Remove logo header, upload bar, and display bar. Co-authored-by: AUAPW LLC <266437609+auapwllc-dev@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f68e34b4c7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function QuoteForm({defaultPart,tok}){ | ||
| defaultPart = defaultPart || ""; | ||
| const YEARS=Array.from({length:37},(_,i)=>String(2025-i)); | ||
| const [year,setYear]=useState("");const [make,setMake]=useState("");const [model,setModel]=useState("");const [part,setPart]=useState(defaultPart); |
There was a problem hiding this comment.
Sync
QuoteForm state when defaultPart changes
On brand pages, selModel is passed into QuoteForm via defaultPart={selModel ? selModel + " Engine" : ""}, but part is initialized with useState(defaultPart) and never updated again. After the form mounts, clicking a different model leaves the part field stuck on the original value or blank, so the brand-model CTA no longer pre-fills the quote as intended.
Useful? React with 👍 / 👎.
| const r = await fetch("https://formsubmit.co/ajax/"+LEAD,{method:"POST",headers:{"Content-Type":"application/json","Accept":"application/json"},body:JSON.stringify({name:p.name,email:p.email,_subject:subj,message:body,_template:"table",_captcha:"false"})}); | ||
| if(r.ok){const d=await r.json();if(d.success==="true"||d.success===true)return true;} |
There was a problem hiding this comment.
Restore the non-preflight fallback for quote submissions
This sendLead implementation only tries the JSON FormSubmit endpoint before falling back to mailto:. The previous components/auapw-app.jsx quote flow also posted FormData, which avoids the CORS preflight; without that step, browsers/extensions/corporate networks that block cross-origin OPTIONS requests can no longer submit a quote in-page and the lead is lost unless the user has a mail client configured.
Useful? React with 👍 / 👎.
| const slug=brand.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,""); | ||
| const HIST={"Toyota":"Toyota Motor Corporation was founded in 1937 by Kiichiro Toyoda. Known for legendary reliability across all their vehicle lines.","Ford":"Ford Motor Company was founded by Henry Ford in 1903. The F-Series truck has been Americas number one selling truck for over 40 consecutive years.","Honda":"Honda Motor Co. was founded in 1948. Known for engineering excellence, reliability, and the world largest production of internal combustion engines.","Chevrolet":"Chevrolet was founded in 1911. The Corvette debuted in 1953. Silverado and Tahoe are among Americas best-selling vehicles.","BMW":"BMW was founded in 1916 in Munich Germany. Renowned for performance luxury. The 3 Series is the benchmark for sports sedans worldwide."}; | ||
| const hist=HIST[brand]||(brand+" has a rich history spanning decades of automotive engineering excellence and innovation."); | ||
| return "<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><title>"+brand+" Used Auto Parts - AUAPW.ORG</title><meta name=\"description\" content=\"Quality used "+brand+" auto parts at AUAPW.ORG. Free shipping, 6-month warranty, 24hr response.\"><link rel=\"canonical\" href=\"https://auapw.org/brands/"+slug+"\"><style>*{box-sizing:border-box;margin:0;padding:0}body{background:#07090f;color:#f5f5f5;font-family:DM Mono,monospace;min-height:100vh}nav{background:rgba(8,10,18,.97);border-bottom:1px solid rgba(255,255,255,.08);padding:0 24px;height:60px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:50}.nav-brand{font-size:1rem;font-weight:900;color:#e8e8e8;text-decoration:none;letter-spacing:.08em;text-transform:uppercase}.nav-links{display:flex;gap:14px}.nav-links a{font-size:10px;font-weight:700;color:#6b7280;text-decoration:none;letter-spacing:.1em;text-transform:uppercase}.btn{display:inline-flex;align-items:center;gap:6px;padding:9px 18px;font-size:10px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;border:1.5px solid rgba(255,255,255,.6);border-radius:3px;color:#fff;background:rgba(255,255,255,.06);cursor:pointer;font-family:DM Mono,monospace;text-decoration:none}.banner{background:linear-gradient(135deg,"+c+"dd,"+c+"99,#06080e);padding:32px 24px;border-bottom:1px solid rgba(255,255,255,.1)}.banner-inner{max-width:1200px;margin:0 auto;display:flex;align-items:center;gap:20px;flex-wrap:wrap}.brand-badge{width:80px;height:80px;border-radius:12px;background:linear-gradient(135deg,"+c+","+c+"88);border:2px solid rgba(255,255,255,.3);display:flex;align-items:center;justify-content:center;flex-shrink:0}.brand-badge span{font-size:22px;font-weight:900;color:rgba(255,255,255,.95)}.brand-title{font-size:clamp(1.2rem,3vw,2rem);font-weight:900;color:#fff;text-transform:uppercase;letter-spacing:.04em;margin-bottom:4px}.badges{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}.badge{padding:2px 8px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.2);border-radius:3px;font-size:9px;color:rgba(255,255,255,.85);letter-spacing:.08em}.container{max-width:1280px;margin:0 auto;padding:48px 24px}.two-col{display:grid;grid-template-columns:1fr 360px;gap:44px;align-items:start}.sticky-form{position:sticky;top:80px}.card{background:rgba(19,22,30,.85);border:1px solid rgba(255,255,255,.08);border-radius:4px;padding:24px;margin-bottom:16px}h2{font-size:clamp(.9rem,2.5vw,1.4rem);font-weight:900;color:#f5f5f5;margin-bottom:14px;text-transform:uppercase;letter-spacing:.04em;line-height:1.15}h3{font-size:1rem;font-weight:900;color:#f5f5f5;margin-bottom:12px;text-transform:uppercase;letter-spacing:.04em}p{font-size:13px;color:#9ca3af;line-height:1.85;font-weight:300;margin-bottom:10px}.models-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:28px}.model-item{padding:10px 14px;background:rgba(19,22,30,.85);border:1px solid rgba(255,255,255,.08);border-radius:5px;font-size:12px;color:#9ca3af;cursor:pointer;text-decoration:none;display:flex;align-items:center;gap:8px}.model-item::before{content:\"\";width:5px;height:5px;border-radius:50%;background:rgba(255,255,255,.25);flex-shrink:0}.faq-item{background:rgba(19,22,30,.85);border:1px solid rgba(255,255,255,.08);border-radius:5px;padding:16px;margin-bottom:8px}.faq-q{font-size:12px;font-weight:700;color:#f5f5f5;margin-bottom:8px}.faq-a{font-size:12px;color:#9ca3af;line-height:1.8;font-weight:300}.form-group{margin-bottom:10px}.form-label{font-size:9px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:#6b7280;display:block;margin-bottom:5px}.form-input{width:100%;padding:9px 11px;background:rgba(13,15,24,.9);border:1px solid rgba(255,255,255,.14);border-radius:5px;font-size:12px;color:#f5f5f5;outline:none;font-family:DM Mono,monospace;appearance:none}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.submit-btn{width:100%;padding:13px;background:rgba(255,255,255,.06);border:1.5px solid rgba(255,255,255,.6);border-radius:3px;color:#fff;font-family:DM Mono,monospace;font-weight:700;font-size:11px;letter-spacing:.18em;text-transform:uppercase;cursor:pointer;margin-top:4px}.url-bar{background:rgba(4,6,13,.98);border-bottom:1px solid rgba(255,255,255,.06);padding:5px 20px;display:flex;align-items:center;gap:10px}.url-pill{flex:1;display:flex;align-items:center;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08);border-radius:5px;padding:3px 10px;gap:7px;max-width:540px}.url-dot{width:9px;height:9px;border-radius:50%;border:1.5px solid rgba(74,222,128,.7);flex-shrink:0}footer{background:rgba(5,7,14,.99);border-top:1px solid rgba(255,255,255,.06);padding:24px;text-align:center;margin-top:60px}.footer-links{display:flex;gap:16px;justify-content:center;flex-wrap:wrap;margin-bottom:10px}.footer-links a{font-size:9px;color:#6b7280;text-decoration:none;letter-spacing:.08em}.footer-text{font-size:9px;color:#4b5563;letter-spacing:.06em}@media(max-width:900px){.two-col{grid-template-columns:1fr}.sticky-form{position:static}.models-grid{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:1fr}.nav-links{display:none}}</style></head><body><nav><a href=\"https://auapw.org\" class=\"nav-brand\">AUAPW.ORG</a><div class=\"nav-links\"><a href=\"https://auapw.org/parts\">Parts</a><a href=\"https://auapw.org/used-engines\">Engines</a><a href=\"https://auapw.org/used-transmissions\">Transmissions</a><a href=\"https://auapw.org/brands\">All Brands</a><a href=\"https://auapw.org/inventory\">Inventory</a><a href=\"https://auapw.org/contact\">Contact</a></div><a href=\"https://auapw.org/get-a-quote\" class=\"btn\">Get Free Quote</a></nav><div class=\"url-bar\"><div class=\"url-pill\"><div class=\"url-dot\"></div><span style=\"font-size:12px;color:#6b7280\">auapw.org/brands/"+slug+"</span></div></div><div class=\"banner\"><div class=\"banner-inner\"><div class=\"brand-badge\"><span>"+gi(brand)+"</span></div><div><div class=\"brand-title\">"+brand+" Used Auto Parts</div><div style=\"font-size:10px;color:rgba(255,255,255,.5);letter-spacing:.12em;margin-bottom:4px\">ALL USED AUTO PARTS WAREHOUSE - AUAPW.ORG</div><div class=\"badges\"><span class=\"badge\">Free Shipping</span><span class=\"badge\">6-Month Warranty</span><span class=\"badge\">OEM Quality</span><span class=\"badge\">24hr Response</span><span class=\"badge\">"+mods.length+" Models</span></div></div></div></div><div class=\"container\"><div class=\"two-col\"><div><div class=\"card\"><h2>"+brand+" - Brand History</h2><p>"+hist+"</p><p>At AUAPW.ORG we source quality used OEM "+brand+" parts from our nationwide network of 2,000+ verified salvage yards. From engines and transmissions to electrical and body parts - we find the right part at the best price.</p></div><h3>"+brand+" Models We Cover</h3><div class=\"models-grid\">"+mods.map(m=>"<a href=\"https://auapw.org/get-a-quote?vehicle="+encodeURIComponent(brand+" "+m)+"\" class=\"model-item\">"+m+"</a>").join("")+"</div><h3>"+brand+" Parts FAQ</h3><div class=\"faq-item\"><div class=\"faq-q\">What "+brand+" parts do you carry?</div><div class=\"faq-a\">We source engines, transmissions, drivetrain, electrical, cooling, suspension, and body parts for all "+brand+" models through our 2,000+ verified yard network.</div></div><div class=\"faq-item\"><div class=\"faq-q\">Are used "+brand+" parts reliable?</div><div class=\"faq-a\">Yes. Used OEM "+brand+" parts are the exact same factory components originally in your vehicle, inspected and graded, backed by our 6-month warranty.</div></div><div class=\"faq-item\"><div class=\"faq-q\">How much can I save on "+brand+" parts?</div><div class=\"faq-a\">Typically 50-80% compared to new dealer prices. Get a free quote at auapw.org/get-a-quote or call (888) 818-5001.</div></div><div class=\"faq-item\"><div class=\"faq-q\">Do "+brand+" parts come with warranty?</div><div class=\"faq-a\">Yes. All parts come with a 30-180 day warranty from the supplying yard. Engine and transmission warranties are typically 90-180 days.</div></div></div><div class=\"sticky-form\"><div class=\"card\"><h3>Find a "+brand+" Part</h3><form action=\"https://formsubmit.co/"+LEAD+"\" method=\"POST\"><input type=\"hidden\" name=\"_subject\" value=\"[AUAPW] "+brand+" Quote Request\"><input type=\"hidden\" name=\"_template\" value=\"table\"><input type=\"hidden\" name=\"_captcha\" value=\"false\"><input type=\"hidden\" name=\"_next\" value=\"https://auapw.org/thank-you\"><div class=\"form-group\"><label class=\"form-label\">Year *</label><select name=\"year\" class=\"form-input\" required><option value=\"\">Select Year</option>"+YEARS.map(y=>"<option>"+y+"</option>").join("")+"</select></div><div class=\"form-group\"><label class=\"form-label\">Model *</label><select name=\"model\" class=\"form-input\" required><option value=\"\">Select Model</option>"+mods.map(m=>"<option>"+m+"</option>").join("")+"</select></div><div class=\"form-group\"><label class=\"form-label\">Part Needed *</label><input type=\"text\" name=\"part\" class=\"form-input\" placeholder=\"Engine, Transmission, CV Axle...\" required></div><div class=\"form-grid\"><div class=\"form-group\"><label class=\"form-label\">First Name *</label><input type=\"text\" name=\"first\" class=\"form-input\" placeholder=\"John\" required></div><div class=\"form-group\"><label class=\"form-label\">Last Name *</label><input type=\"text\" name=\"last\" class=\"form-input\" placeholder=\"Smith\" required></div></div><div class=\"form-group\"><label class=\"form-label\">Phone *</label><input type=\"tel\" name=\"phone\" class=\"form-input\" placeholder=\"(555) 000-0000\" required></div><div class=\"form-group\"><label class=\"form-label\">Email *</label><input type=\"email\" name=\"email\" class=\"form-input\" placeholder=\"you@email.com\" required></div><div class=\"form-grid\"><div class=\"form-group\"><label class=\"form-label\">Zip Code *</label><input type=\"text\" name=\"zip\" class=\"form-input\" placeholder=\"90210\" required></div><div class=\"form-group\"><label class=\"form-label\">State *</label><select name=\"state\" class=\"form-input\" required><option value=\"\">State</option>"+STATES.map(s=>"<option>"+s+"</option>").join("")+"</select></div></div><p style=\"font-size:8.5px;color:#6b7280;margin:8px 0;line-height:1.6\">By submitting you authorize AUAPW.ORG to contact you via phone/text/email.</p><button type=\"submit\" class=\"submit-btn\">Get Free Quote</button><p style=\"text-align:center;font-size:9px;color:#4b5563;margin-top:8px\">Response within 24 hours guaranteed</p></form><div style=\"margin-top:14px;padding-top:14px;border-top:1px solid rgba(255,255,255,.06);text-align:center\"><a href=\"tel:8888185001\" style=\"font-size:12px;font-weight:700;color:#f5f5f5;text-decoration:none\">Call (888) 818-5001</a></div></div></div></div></div><footer><div class=\"footer-links\"><a href=\"https://auapw.org\">Home</a><a href=\"https://auapw.org/parts\">Parts</a><a href=\"https://auapw.org/brands\">All Brands</a><a href=\"https://auapw.org/used-engines\">Engines</a><a href=\"https://auapw.org/used-transmissions\">Transmissions</a><a href=\"https://auapw.org/get-a-quote\">Free Quote</a><a href=\"https://auapw.org/contact\">Contact</a></div><div class=\"footer-text\">2025 AUAPW.ORG - ALL USED AUTO PARTS WAREHOUSE - auapw.org/brands/"+slug+"</div></footer></body></html>"; |
There was a problem hiding this comment.
Point exported brand forms at a real confirmation page
generateBrandHTML() hard-codes _next=https://auapw.org/thank-you, but this repo only defines app/page.tsx and app/layout.tsx (checked with find app -maxdepth 2 -type f). That means a successful submission from any downloaded brand page will redirect the customer to a 404 instead of a confirmation screen, making the export feature look broken immediately after capture.
Useful? React with 👍 / 👎.
Transparent logo area replaces green header background.
Eliminate logo header display and button for cleaner UI. Co-authored-by: AUAPW LLC <266437609+auapwllc-dev@users.noreply.github.com>
Add BRAND_LOGOS object, update banner, and display logos in grid Co-authored-by: AUAPW LLC <266437609+auapwllc-dev@users.noreply.github.com>
Replace emoji logos with official brand codes for professional look. Co-authored-by: AUAPW LLC <266437609+auapwllc-dev@users.noreply.github.com>
Replace text codes with permanent SVG logos in app display. Co-authored-by: AUAPW LLC <266437609+auapwllc-dev@users.noreply.github.com>
Add car brands grid with logos, gradients, and view button. Co-authored-by: AUAPW LLC <266437609+auapwllc-dev@users.noreply.github.com>
Use Unicode symbols for car brand icons to enhance visual appeal. Co-authored-by: AUAPW LLC <266437609+auapwllc-dev@users.noreply.github.com>
Add scalable, responsive, and performance-optimized SVG logos for all luxury brands. Co-authored-by: AUAPW LLC <266437609+auapwllc-dev@users.noreply.github.com>
Use 'BrandLogoImg' for official logos with fallback text. Co-authored-by: AUAPW LLC <266437609+auapwllc-dev@users.noreply.github.com>
Use local paths for all car brand logos and add fallback text. Co-authored-by: AUAPW LLC <266437609+auapwllc-dev@users.noreply.github.com>
Use 'BrandLogoImg' for official logos with fallback text.
Create and store brand logo images for proper loading. Co-authored-by: AUAPW LLC <266437609+auapwllc-dev@users.noreply.github.com>
…mages Use 'BrandLogoImg' for official logos with fallback text.
Create and store logo images for major brands for proper display. Co-authored-by: AUAPW LLC <266437609+auapwllc-dev@users.noreply.github.com>
Marketplace Features
UI/UX Enhancements
v0 Session