Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
saadeghi committed Jun 27, 2024
1 parent f84f59c commit 80db7a0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 34 deletions.
2 changes: 1 addition & 1 deletion src/docs/src/lib/data/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const productCustomAttributes = {
130237: {
screenshot: "https://img.daisyui.com/images/store/screenshots/auth.png",
tech: ["html", "daisyui"],
partnerid: "VMAme",
ref: "VMAme",
},
120591: {
screenshot: "https://img.daisyui.com/images/store/screenshots/dashboard.png",
Expand Down
2 changes: 1 addition & 1 deletion src/docs/src/routes/(docs)/store/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ const copyText = (text) => {
</div>
<div class="flex flex-col items-center gap-3">
<a
href="{product.customattributes.partnerid ? `/store/redirect?product_id=${extractUUID(product.attributes.buy_now_url)}&aff=${product.customattributes.partnerid}` : product.attributes.buy_now_url}"
href="{product.customattributes.ref ? `/store/checkout?product=${extractUUID(product.attributes.buy_now_url)}&ref=${product.customattributes.ref}` : product.attributes.buy_now_url}"
class="btn btn-primary shadow-primary/50 group shrink-0 rounded-full shadow xl:px-10"
target="_blank"
rel="noopener noreferrer">
Expand Down
1 change: 1 addition & 0 deletions src/docs/src/routes/(docs)/store/checkout/+page.server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const csr = false
19 changes: 19 additions & 0 deletions src/docs/src/routes/(docs)/store/checkout/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<svelte:head>
<title>Loading…</title>
<meta name="robots" content="noindex">
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
<script>
const urlParams = new URLSearchParams(window.location.search)
window.lemonSqueezyAffiliateConfig = {
store: "daisyui",
trackOnLoad: false,
onReady: (e) => {
e.Track(urlParams.get("ref"))
},
onTrack: (e) => {
window.location.href = `https://daisyui.lemonsqueezy.com/checkout/buy/${urlParams.get("product")}?aff_ref=${e.click}`
},
}
</script>
<script src="https://lmsqueezy.com/affiliate.js" defer></script>
</svelte:head>
32 changes: 0 additions & 32 deletions src/docs/src/routes/(docs)/store/redirect/[email protected]

This file was deleted.

0 comments on commit 80db7a0

Please sign in to comment.