"use client";
import { getPublicApiUrl } from "../../../../client/config";
import { isGoogleAuthEnabled } from "../../../../login";
import { Button, Link } from "../../../../shadcnui";
interface GoogleSignInButtonProps {
referralCode?: string | null;
}
export function GoogleSignInButton({ referralCode }: GoogleSignInButtonProps) {
if (!isGoogleAuthEnabled()) {
return null;
}
// Build OAuth URL with referral parameter if available
const buildGoogleOAuthUrl = (): string => {
const baseUrl = `${getPublicApiUrl()}auth/google`;
if (!referralCode) return baseUrl;
return `${baseUrl}?referral=${encodeURIComponent(referralCode)}`;
};
return (
);
}