Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified bun.lockb
Binary file not shown.
18 changes: 3 additions & 15 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,19 +252,7 @@
"cancel": "Cancel",
"no-reviews": "No reviews yet. Add your first client review.",
"count": "{count}/10 reviews",
"confirm-delete": "Are you sure you want to delete this review?",
"google-title": "Auto-pull Google Reviews",
"google-description": "Sync reviews from your Google Business Profile. Synced reviews appear alongside your manual reviews.",
"google-place-placeholder": "Google Place ID (e.g. ChIJN1t_tDeuEmsRUsoyG83frY4)",
"google-save": "Save",
"google-sync": "Sync",
"google-enter-place-id": "Enter your Google Place ID first",
"google-synced": "Synced {count} Google {count, plural, one {review} other {reviews}}",
"google-sync-failed": "Sync failed",
"google-last-synced": "Last synced: {date}",
"google-show-on-page": "Show Google reviews on my public page",
"google-find-place-id": "Google Place ID Finder",
"google-find-hint": "Find your Place ID at"
"confirm-delete": "Are you sure you want to delete this review?"
},
"dashboard-themes": {
"title": "Appearance",
Expand Down Expand Up @@ -855,7 +843,6 @@
"login-success": "Login successful",
"register-success": "Registration successful",
"home": "Home",
"google-disconnected": "Google successfully disconnected",
"not-found": "Not found",
"username-required": "A username is required to publish your page",
"username-reserved": "This username is reserved",
Expand All @@ -868,7 +855,8 @@
"no-subscription": "No subscription found",
"max-links": "Maximum 10 links allowed",
"max-image-size": "Images must be maximum 5MB",
"image-type": "Images must be JPG, PNG or WebP"
"image-type": "Images must be JPG, PNG or WebP",
"google-disconnected": "Google successfully disconnected"
},
"footer": {
"tagline": "The professional page your clients expect.",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@tailwindcss/typography": "^0.5.19",
"@vercel/analytics": "^1.6.1",
"@vercel/functions": "^1.6.0",
"@vercel/speed-insights": "^2.0.0",
"arctic": "^3.7.0",
"autoprefixer": "^10.4.24",
"axios": "^1.13.5",
Expand Down
5 changes: 0 additions & 5 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ model User {
calendlyUrl String?
calendlyEnabled Boolean @default(false)
zillowUrl String?
googlePlaceId String?
googleSyncEnabled Boolean @default(false)
googleReviewsLastSynced DateTime?
zapierWebhookUrl String?
fubApiKey String?
mailchimpApiKey String?
Expand Down Expand Up @@ -131,8 +128,6 @@ model Review {
quote String
stars Int @default(5)
position Int @default(0)
isGoogleReview Boolean @default(false)
googleReviewId String? @unique
userId String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
Expand Down
158 changes: 0 additions & 158 deletions src/app/[locale]/(dashboard)/dashboard/reviews/google-reviews-sync.tsx

This file was deleted.

29 changes: 4 additions & 25 deletions src/app/[locale]/(dashboard)/dashboard/reviews/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ import type { Metadata } from "next";
import { redirect } from "next/navigation";
import { getTranslations } from "next-intl/server";
import { getUser } from "@/lib/auth";
import { isPro } from "@/lib/subscription";
import db from "@/lib/db";
import { ReviewsManager } from "./reviews";
import GoogleReviewsSync from "./google-reviews-sync";

export const generateMetadata = async (): Promise<Metadata> => {
const t = await getTranslations("pages.dashboard-reviews");
Expand All @@ -20,36 +18,17 @@ const Page = async () => {
redirect("/login");
}

const [reviews, pro, user] = await Promise.all([
db.review.findMany({
where: { userId: session.user.id },
orderBy: { position: "asc" },
}),
isPro(session.user.id),
db.user.findUnique({
where: { id: session.user.id },
select: {
googlePlaceId: true,
googleSyncEnabled: true,
googleReviewsLastSynced: true,
},
}),
]);
const reviews = await db.review.findMany({
where: { userId: session.user.id },
orderBy: { position: "asc" },
});

return (
<>
<div className="max-w-6xl mx-auto">
<h1 className="text-3xl font-bold mb-2">{t("title")}</h1>
<p className="text-neutral/80 mb-8">{t("description")}</p>

{pro && (
<GoogleReviewsSync
googlePlaceId={user?.googlePlaceId ?? ""}
googleSyncEnabled={user?.googleSyncEnabled ?? false}
lastSynced={user?.googleReviewsLastSynced ?? null}
/>
)}

<ReviewsManager reviews={reviews} />
</div>
</>
Expand Down
114 changes: 0 additions & 114 deletions src/app/api/dashboard/reviews/google-sync/route.ts

This file was deleted.

Loading
Loading