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...");
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 KiB

After

Width:  |  Height:  |  Size: 218 KiB

+8 -2
View File
@@ -92,7 +92,7 @@
<path d="M3 10h18" ></path>
<path d="m16 20 2 2 4-4" ></path>
</symbol>
<symbol class="lucide lucide-calendar-days" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="calendar-days">
<symbol class="lucide lucide-calendar-days" viewBox="0 0 24 24" fill="inherit" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="calendar-days">
<path d="M8 2v4" ></path>
<path d="M16 2v4" ></path>
<rect width="18" height="18" x="3" y="4" rx="2" ></rect>
@@ -104,7 +104,7 @@
<path d="M12 18h.01" ></path>
<path d="M16 18h.01" ></path>
</symbol>
<symbol class="lucide lucide-calendar-heart" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="calendar-heart">
<symbol class="lucide lucide-calendar-heart" viewBox="0 0 24 24" fill="inherit" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="calendar-heart">
<path d="M3 10h18V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7" ></path>
<path d="M8 2v4" ></path>
<path d="M16 2v4" ></path>
@@ -319,6 +319,12 @@
<symbol class="lucide lucide-folder" viewBox="0 0 24 24" fill="inherit" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="folder">
<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" ></path>
</symbol>
<symbol class="lucide lucide-gift" viewBox="0 0 24 24" fill="inherit" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="gift">
<rect x="3" y="8" width="18" height="4" rx="1" ></rect>
<path d="M12 8v13" ></path>
<path d="M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7" ></path>
<path d="M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5" ></path>
</symbol>
<symbol class="lucide lucide-git-merge" viewBox="0 0 24 24" fill="inherit" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="git-merge">
<circle cx="18" cy="18" r="3" ></circle>
<circle cx="6" cy="6" r="3" ></circle>

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 47 KiB