feat: add full Google review feed to reviews page

This commit is contained in:
DMleadgen 2026-03-27 14:19:56 -06:00
parent 7831984798
commit 8184149c3f
Signed by: matt
GPG key ID: C2720CF8CD701894

View file

@ -1,7 +1,9 @@
'use client'
import { useEffect } from "react"
import { Star } from "lucide-react"
import Link from "next/link"
import { Badge } from "@/components/ui/badge"
import { PublicInset, PublicPageHeader, PublicSurface } from "@/components/public-surface"
const reviews = [
@ -38,6 +40,25 @@ const reviews = [
]
export function ReviewsPage() {
useEffect(() => {
const existingScript = document.querySelector('script[data-rocky-reviews-widget="true"]')
if (existingScript) {
return
}
const script = document.createElement("script")
script.src = "https://reputationhub.site/reputation/assets/review-widget.js"
script.type = "text/javascript"
script.dataset.rockyReviewsWidget = "true"
document.body.appendChild(script)
return () => {
if (document.body.contains(script)) {
document.body.removeChild(script)
}
}
}, [])
return (
<div className="container mx-auto px-4 py-10 md:py-14">
<PublicPageHeader
@ -62,6 +83,36 @@ export function ReviewsPage() {
))}
</div>
<section className="mt-12">
<PublicSurface className="overflow-hidden p-5 md:p-7">
<div className="flex flex-col gap-4 border-b border-border/60 pb-6 md:flex-row md:items-end md:justify-between">
<div>
<p className="text-xs font-semibold uppercase tracking-[0.2em] text-primary/80">All Google Reviews</p>
<h2 className="mt-2 text-3xl font-semibold tracking-tight text-balance">
Browse the full review feed from Rocky Mountain Vending customers.
</h2>
<p className="mt-3 max-w-3xl text-sm leading-relaxed text-muted-foreground">
This is the same live review feed that powers the Google review widget, so the dedicated reviews page
shows the full set instead of just a few highlight quotes.
</p>
</div>
<Badge variant="secondary" className="w-fit rounded-full px-3 py-1 text-sm">
4.9 / 5.0 on Google
</Badge>
</div>
<div className="mt-6">
<iframe
className="lc_reviews_widget min-h-[900px] w-full rounded-[1.5rem] border border-border/60 bg-background"
src="https://reputationhub.site/reputation/widgets/review_widget/YAoWLgNSid8oG44j9BjG"
frameBorder="0"
scrolling="no"
title="Rocky Mountain Vending Google Reviews"
/>
</div>
</PublicSurface>
</section>
<section className="mt-12 grid gap-6 lg:grid-cols-[1.15fr_0.85fr]">
<PublicSurface>
<h2 className="text-3xl font-semibold tracking-tight text-balance">Why customers keep choosing Rocky Mountain Vending</h2>