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.

final changes

Steven Tey975f8a47a404
diff --git a/components/app/modals/accept-invite-modal.tsx b/components/app/modals/accept-invite-modal.tsx
index ecb25f89ec..fa672393af 100644
--- a/components/app/modals/accept-invite-modal.tsx
+++ b/components/app/modals/accept-invite-modal.tsx
@@ -11,7 +11,7 @@ import BlurImage from "@/components/shared/blur-image";
import LoadingDots from "@/components/shared/icons/loading-dots";
import Modal from "@/components/shared/modal";
import useProject from "@/lib/swr/use-project";
-import { InlineSnippet } from "../settings/custom-domain/domain-configuration";
+import toast from "react-hot-toast";
function AcceptInviteModal({
showAcceptInviteModal,
@@ -42,7 +42,10 @@ function AcceptInviteModal({
<h3 className="text-lg font-medium">Project Invitation</h3>
<p className="text-center text-sm text-gray-500">
You've been invited to join and collaborate on the{" "}
- <InlineSnippet>{slug}</InlineSnippet> team on Dub
+ <span className="font-mono text-purple-600">
+ {slug || "......"}
+ </span>{" "}
+ team on Dub
</p>
</div>
<div className="flex flex-col space-y-6 bg-gray-50 px-4 py-8 text-left sm:px-16">
@@ -52,9 +55,10 @@ function AcceptInviteModal({
fetch(`/api/projects/${slug}/invite/accept`, {
method: "POST",
headers: { "Content-Type": "application/json" },
- }).then(async () => {
+ }).then(() => {
+ toast.success("You now are a part of this project!");
mutate(`/api/projects/${slug}`);
- setShowAcceptInviteModal(false);
+ mutate(`/api/projects/${slug}/users`);
});
}}
disabled={accepting}
diff --git a/components/app/modals/invite-teammate-modal.tsx b/components/app/modals/invite-teammate-modal.tsx
index c5fff8f65e..c2c234776d 100644
--- a/components/app/modals/invite-teammate-modal.tsx
+++ b/components/app/modals/invite-teammate-modal.tsx
@@ -11,6 +11,7 @@ import BlurImage from "@/components/shared/blur-image";
import LoadingDots from "@/components/shared/icons/loading-dots";
import Modal from "@/components/shared/modal";
import useProject from "@/lib/swr/use-project";
+import toast from "react-hot-toast";
function InviteTeammateModal({
showInviteTeammateModal,
@@ -57,7 +58,9 @@ function InviteTeammateModal({
}).then(async (res) => {
if (res.status === 200) {
setState("invited");
+ toast.success("Invitation sent!");
mutate(`/api/projects/${slug}/invite`);
+ setShowInviteTeammateModal(false);
} else {
setState("idle");
const response = await res.json();
diff --git a/package.json b/package.json
index ad55451709..beef297477 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,7 @@
"cloudinary": "^1.32.0",
"cobe": "^0.6.2",
"focus-trap-react": "^10.0.0",
- "framer-motion": "^7.2.1",
+ "framer-motion": "^7.6.2",
"html-escaper": "^3.0.3",
"i": "^0.3.7",
"mailing": "^0.8.3-next.0",
diff --git a/yarn.lock b/yarn.lock
index 93f4622865..af609e17d3 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3084,10 +3084,10 @@ fraction.js@^4.2.0:
resolved "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz"
integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==
-framer-motion@^7.2.1:
- version "7.2.1"
- resolved "https://registry.npmjs.org/framer-motion/-/framer-motion-7.2.1.tgz"
- integrity sha512-bt2ZqqGpPsW6UojYUa5poWQJu3sDr4Dp3IZsdVBYdKUJ8p+9PxOk1fYRAT8lTGGmaC5HFoKrbDXQeKWGAKZz9g==
+framer-motion@^7.6.2:
+ version "7.6.2"
+ resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-7.6.2.tgz#7fb93ebfeda27c8c2cff1895ca7a417229e81bf7"
+ integrity sha512-YRr+KaC+1MlLx7iArVyjZRpc0QXI7H0XIOJrdol+dF1+WLQJwS2sP04KGq808BG+byD36UAmAt4YqObE5YFLtw==
dependencies:
"@motionone/dom" "10.13.1"
framesync "6.1.2"