mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
feat(cli): add polar as better-auth plugin (#578)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
export default async function SuccessPage({
|
||||
searchParams,
|
||||
}: {
|
||||
searchParams: Promise<{ checkout_id: string }>
|
||||
}) {
|
||||
const params = await searchParams;
|
||||
const checkout_id = params.checkout_id;
|
||||
|
||||
return (
|
||||
<div className="px-4 py-8">
|
||||
<h1>Payment Successful!</h1>
|
||||
{checkout_id && <p>Checkout ID: {checkout_id}</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { useSearchParams } from "react-router";
|
||||
|
||||
export default function SuccessPage() {
|
||||
const [searchParams] = useSearchParams();
|
||||
const checkout_id = searchParams.get("checkout_id");
|
||||
|
||||
return (
|
||||
<div className="container mx-auto px-4 py-8">
|
||||
<h1>Payment Successful!</h1>
|
||||
{checkout_id && <p>Checkout ID: {checkout_id}</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { createFileRoute, useSearch } from "@tanstack/react-router";
|
||||
|
||||
export const Route = createFileRoute("/success")({
|
||||
component: SuccessPage,
|
||||
validateSearch: (search) => ({
|
||||
checkout_id: search.checkout_id as string,
|
||||
}),
|
||||
});
|
||||
|
||||
function SuccessPage() {
|
||||
const { checkout_id } = useSearch({ from: "/success" });
|
||||
|
||||
return (
|
||||
<div className="container mx-auto px-4 py-8">
|
||||
<h1>Payment Successful!</h1>
|
||||
{checkout_id && <p>Checkout ID: {checkout_id}</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { createFileRoute, useSearch } from "@tanstack/react-router";
|
||||
|
||||
export const Route = createFileRoute("/success")({
|
||||
component: SuccessPage,
|
||||
validateSearch: (search) => ({
|
||||
checkout_id: search.checkout_id as string,
|
||||
}),
|
||||
});
|
||||
|
||||
function SuccessPage() {
|
||||
const { checkout_id } = useSearch({ from: "/success" });
|
||||
|
||||
return (
|
||||
<div className="container mx-auto px-4 py-8">
|
||||
<h1>Payment Successful!</h1>
|
||||
{checkout_id && <p>Checkout ID: {checkout_id}</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user