@@ -118,14 +118,25 @@ class="size-5 shrink-0"
118118 </p >
119119 </div >
120120
121- {{-- Button --}}
122- <a
123- href =" {{ \App \Enums \Subscription:: Mini -> stripePaymentLink () } }"
124- class =" my-5 block w-full rounded-2xl bg-zinc-200 py-4 text-center text-sm font-medium transition duration-200 ease-in-out hover:bg-zinc-800 hover:text-white dark:bg-slate-700/30 dark:hover:bg-slate-700/40"
125- aria-label =" Get started with Mini plan"
126- >
127- Get started
128- </a >
121+ @auth
122+ <button
123+ type =" button"
124+ wire:click =" createCheckoutSession('mini')"
125+ class =" my-5 block w-full rounded-2xl bg-zinc-200 py-4 text-center text-sm font-medium transition duration-200 ease-in-out hover:bg-zinc-800 hover:text-white dark:bg-slate-700/30 dark:hover:bg-slate-700/40"
126+ aria-label =" Get started with Mini plan"
127+ >
128+ Get started
129+ </button >
130+ @else
131+ <button
132+ type =" button"
133+ @click =" $dispatch('open-purchase-modal', { plan: 'mini' })"
134+ class =" my-5 block w-full rounded-2xl bg-zinc-200 py-4 text-center text-sm font-medium transition duration-200 ease-in-out hover:bg-zinc-800 hover:text-white dark:bg-slate-700/30 dark:hover:bg-slate-700/40"
135+ aria-label =" Get started with Mini plan"
136+ >
137+ Get started
138+ </button >
139+ @endauth
129140
130141 {{-- Features --}}
131142 <div
@@ -281,14 +292,25 @@ class="size-5 shrink-0"
281292 </p >
282293 </div >
283294
284- {{-- Button --}}
285- <a
286- href =" {{ \App \Enums \Subscription:: Pro -> stripePaymentLink () } }"
287- class =" my-5 block w-full rounded-2xl bg-zinc-200 py-4 text-center text-sm font-medium transition duration-200 ease-in-out hover:bg-zinc-800 hover:text-white dark:bg-slate-700/30 dark:hover:bg-slate-700/40"
288- aria-label =" Get started with Pro plan"
289- >
290- Get started
291- </a >
295+ @auth
296+ <button
297+ type =" button"
298+ wire:click =" createCheckoutSession('pro')"
299+ class =" my-5 block w-full rounded-2xl bg-zinc-200 py-4 text-center text-sm font-medium transition duration-200 ease-in-out hover:bg-zinc-800 hover:text-white dark:bg-slate-700/30 dark:hover:bg-slate-700/40"
300+ aria-label =" Get started with Pro plan"
301+ >
302+ Get started
303+ </button >
304+ @else
305+ <button
306+ type =" button"
307+ @click =" $dispatch('open-purchase-modal', { plan: 'pro' })"
308+ class =" my-5 block w-full rounded-2xl bg-zinc-200 py-4 text-center text-sm font-medium transition duration-200 ease-in-out hover:bg-zinc-800 hover:text-white dark:bg-slate-700/30 dark:hover:bg-slate-700/40"
309+ aria-label =" Get started with Pro plan"
310+ >
311+ Get started
312+ </button >
313+ @endauth
292314
293315 {{-- Features --}}
294316 <div
@@ -452,14 +474,25 @@ class="size-5 shrink-0"
452474 </p >
453475 </div >
454476
455- {{-- Button --}}
456- <a
457- href =" {{ \App \Enums \Subscription:: Max -> stripePaymentLink () } }"
458- class =" my-5 block w-full rounded-2xl bg-zinc-800 py-4 text-center text-sm font-medium text-white transition duration-200 ease-in-out hover:bg-zinc-900 dark:bg-[#d68ffe] dark:text-black dark:hover:bg-[#e1acff]"
459- aria-label =" Get started with Max plan"
460- >
461- Get started
462- </a >
477+ @auth
478+ <button
479+ type =" button"
480+ wire:click =" createCheckoutSession('max')"
481+ class =" my-5 block w-full rounded-2xl bg-zinc-800 py-4 text-center text-sm font-medium text-white transition duration-200 ease-in-out hover:bg-zinc-900 dark:bg-[#d68ffe] dark:text-black dark:hover:bg-[#e1acff]"
482+ aria-label =" Get started with Max plan"
483+ >
484+ Get started
485+ </button >
486+ @else
487+ <button
488+ type =" button"
489+ @click =" $dispatch('open-purchase-modal', { plan: 'max' })"
490+ class =" my-5 block w-full rounded-2xl bg-zinc-800 py-4 text-center text-sm font-medium text-white transition duration-200 ease-in-out hover:bg-zinc-900 dark:bg-[#d68ffe] dark:text-black dark:hover:bg-[#e1acff]"
491+ aria-label =" Get started with Max plan"
492+ >
493+ Get started
494+ </button >
495+ @endauth
463496
464497 {{-- Features --}}
465498 <div
@@ -569,4 +602,7 @@ class="grid size-7 shrink-0 place-items-center rounded-xl bg-[#D4FD7D] dark:bg-[
569602 </div >
570603 </div >
571604 </div >
605+ @guest
606+ <livewire:purchase-modal />
607+ @endguest
572608</section >
0 commit comments