Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

mutate project when update logo

Steven Tey9877790d3c49
diff --git a/apps/web/app/api/callback/stripe/route.ts b/apps/web/app/api/callback/stripe/route.ts
index 7d2e58aacf..b39e0e3a35 100644
--- a/apps/web/app/api/callback/stripe/route.ts
+++ b/apps/web/app/api/callback/stripe/route.ts
@@ -98,7 +98,7 @@ export const POST = async (req: Request) => {
if (!data) {
await log({
message:
- "Project not found in Stripe webhook `customer.subscription.created` callback",
+ "Project not found in Stripe webhook `customer.subscription.updated` callback",
type: "cron",
mention: true,
});
diff --git a/apps/web/ui/projects/upload-logo.tsx b/apps/web/ui/projects/upload-logo.tsx
index def90354f7..28cdd2eade 100644
--- a/apps/web/ui/projects/upload-logo.tsx
+++ b/apps/web/ui/projects/upload-logo.tsx
@@ -6,6 +6,7 @@ import { UploadCloud } from "lucide-react";
import { useRouter } from "next/navigation";
import { useCallback, useEffect, useState } from "react";
import { toast } from "sonner";
+import { mutate } from "swr";
export default function UploadLogo() {
const router = useRouter();
@@ -55,6 +56,7 @@ export default function UploadLogo() {
}).then(async (res) => {
if (res.status === 200) {
router.refresh();
+ await mutate(`/api/projects/${slug}`);
toast.success("Succesfully uploaded project logo!");
} else if (res.status === 413) {
toast.error("File size too big (max 2MB)");