'use client';
import type { OAuthStrategy } from '@/types';
import { useSignUp } from '@clerk/nextjs';
import { toast } from 'sonner';
import EmailSignUp from './email-sign-up';
const PageClient = () => {
const { signUp } = useSignUp();
const signInWith = (strategy: OAuthStrategy) => {
if (!signUp) {
return toast.error('Sign in is not available at the moment');
}
return signUp.authenticateWithRedirect({
strategy,
redirectUrl: '/sso-callback',
redirectUrlComplete: '/',
});
};
return (
Create an account
Already have an account?{' '}
Sign in
);
};
export default PageClient;