feat: enable PostHog session replay and fix checkout origin fallback
- Enable session recording in PostHog provider (was disabled by default) - Add origin URL fallback in checkout route to prevent Stripe "Not a valid URL" error - Refactor logo component to extract LogoIcon and add color scheme support - Add .moat/ to gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -67,3 +67,6 @@ dist/
|
||||
|
||||
# Auto Claude data directory
|
||||
.auto-claude/
|
||||
|
||||
# Moat task system
|
||||
.moat/
|
||||
|
||||
@@ -31,7 +31,7 @@ export async function POST(request: NextRequest) {
|
||||
}
|
||||
|
||||
const stripe = getStripe();
|
||||
const origin = request.headers.get("origin") || "";
|
||||
const origin = request.headers.get("origin") || process.env.NEXT_PUBLIC_URL || "http://localhost:3000";
|
||||
const lang = locale || "en";
|
||||
|
||||
const session = await stripe.checkout.sessions.create({
|
||||
|
||||
@@ -3,20 +3,17 @@ import { cn } from "@turbostarter/ui";
|
||||
interface WhyRatingLogoProps {
|
||||
className?: string;
|
||||
iconClassName?: string;
|
||||
wordmarkClassName?: string;
|
||||
showWordmark?: boolean;
|
||||
colorScheme?: "light" | "dark";
|
||||
}
|
||||
|
||||
export function WhyRatingLogo({
|
||||
className,
|
||||
iconClassName,
|
||||
showWordmark = true,
|
||||
}: WhyRatingLogoProps) {
|
||||
function LogoIcon({ className }: { className?: string }) {
|
||||
return (
|
||||
<div className={cn("flex items-center gap-2", className)}>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 120 120"
|
||||
className={cn("h-8 w-8", iconClassName)}
|
||||
className={cn("h-8 w-8", className)}
|
||||
>
|
||||
<defs>
|
||||
<clipPath id="whyrating-clip">
|
||||
@@ -43,50 +40,41 @@ export function WhyRatingLogo({
|
||||
<circle cx="60" cy="62" r="27" fill="#1E293B" />
|
||||
<circle cx="60" cy="62" r="21" fill="#FEF3C7" />
|
||||
<g clipPath="url(#whyrating-clip)">
|
||||
<rect
|
||||
x="42"
|
||||
y="58"
|
||||
width="11"
|
||||
height="35"
|
||||
rx="1.5"
|
||||
ry="1.5"
|
||||
fill="#86EFAC"
|
||||
/>
|
||||
<rect
|
||||
x="55"
|
||||
y="51"
|
||||
width="11"
|
||||
height="42"
|
||||
rx="1.5"
|
||||
ry="1.5"
|
||||
fill="#22C55E"
|
||||
/>
|
||||
<rect
|
||||
x="68"
|
||||
y="44"
|
||||
width="11"
|
||||
height="49"
|
||||
rx="1.5"
|
||||
ry="1.5"
|
||||
fill="#15803D"
|
||||
/>
|
||||
<rect x="42" y="58" width="11" height="35" rx="1.5" ry="1.5" fill="#86EFAC" />
|
||||
<rect x="55" y="51" width="11" height="42" rx="1.5" ry="1.5" fill="#22C55E" />
|
||||
<rect x="68" y="44" width="11" height="49" rx="1.5" ry="1.5" fill="#15803D" />
|
||||
</g>
|
||||
<rect
|
||||
x="68"
|
||||
y="44"
|
||||
width="11"
|
||||
height="18"
|
||||
rx="1.5"
|
||||
ry="1.5"
|
||||
fill="#15803D"
|
||||
/>
|
||||
<rect x="68" y="44" width="11" height="18" rx="1.5" ry="1.5" fill="#15803D" />
|
||||
</g>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function WhyRatingLogo({
|
||||
className,
|
||||
iconClassName,
|
||||
wordmarkClassName,
|
||||
showWordmark = true,
|
||||
colorScheme = "light",
|
||||
}: WhyRatingLogoProps) {
|
||||
const isDark = colorScheme === "dark";
|
||||
|
||||
return (
|
||||
<div className={cn("flex items-center gap-2", className)}>
|
||||
<LogoIcon className={iconClassName} />
|
||||
{showWordmark && (
|
||||
<span className="font-wordmark font-bold text-foreground text-xl">
|
||||
whyrating.com
|
||||
<span
|
||||
className={cn(
|
||||
"font-wordmark font-bold text-xl",
|
||||
isDark ? "text-zinc-50" : "text-foreground",
|
||||
wordmarkClassName,
|
||||
)}
|
||||
>
|
||||
whyrating<span className="text-amber-500">.com</span>
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export { LogoIcon };
|
||||
|
||||
@@ -27,7 +27,7 @@ if (typeof window !== "undefined" && isValidPosthogConfig) {
|
||||
person_profiles: "always",
|
||||
capture_pageview: false,
|
||||
disable_external_dependency_loading: true,
|
||||
disable_session_recording: true,
|
||||
disable_session_recording: false,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user