Files
myeasycms-v2/apps/web/app/(marketing)/components/site-header-account-section.tsx
giancarlo cb8b23e8c0 Remove billing and checkout redirect buttons and related services
Deleted the billing-redirect-button, checkout-redirect-button, and embedded-stripe-checkout components. Additionally, removed the shadcn directory, which encompassed billing-related icons. This change streamlines the subscription settings interface and organizes the system's payment management. This update is a stepping stone towards improving the billing system's overall architecture.
2024-03-25 11:39:41 +08:00

49 lines
1.2 KiB
TypeScript

'use client';
import Link from 'next/link';
import { ChevronRightIcon } from 'lucide-react';
import { PersonalAccountDropdown } from '@kit/accounts/personal-account-dropdown';
import { useSignOut } from '@kit/supabase/hooks/use-sign-out';
import { useUserSession } from '@kit/supabase/hooks/use-user-session';
import { Button } from '@kit/ui/button';
import pathsConfig from '~/config/paths.config';
export function SiteHeaderAccountSection() {
const signOut = useSignOut();
const userSession = useUserSession();
if (userSession.data) {
return (
<PersonalAccountDropdown
session={userSession.data}
paths={{
home: pathsConfig.app.home,
}}
signOutRequested={() => signOut.mutateAsync()}
/>
);
}
return <AuthButtons />;
}
function AuthButtons() {
return (
<div className={'hidden space-x-2 lg:flex'}>
<Button variant={'link'}>
<Link href={pathsConfig.auth.signIn}>Sign In</Link>
</Button>
<Link href={pathsConfig.auth.signUp}>
<Button className={'rounded-full'}>
Sign Up
<ChevronRightIcon className={'h-4'} />
</Button>
</Link>
</div>
);
}