fix: Show toast after copy referral link + change icon to "gift" (#16618)

Co-authored-by: zomars <[email protected]>
This commit is contained in:
Steven Teyandzomars authored and GitHub committed 2024-09-12 22:06:21 +00:00
1 parent d9133cb395
commit f2b3e620b4
9 files changed
+41 -17

No files matched your search

+2 -1
View File
@@ -16,9 +16,10 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
}
try {
return await dub.links.get({
const { shortLink } = await dub.links.get({
externalId: `ext_${session.user.id.toString()}`,
});
return res.status(200).json({ shortLink });
} catch (error) {
console.log("Referral link not found, creating...");
}