Cleanup. Stuff from yesterday idk

This commit is contained in:
2025-06-06 08:43:18 -05:00
parent a776c5a30a
commit 35e019558f
29 changed files with 866 additions and 694 deletions

View File

@ -17,9 +17,9 @@ export const SignInWithApple = () => {
try {
setStatusMessage('');
setIsSigningIn(true);
const result = await signInWithApple();
if (result?.success && result.data) {
// Redirect to Apple OAuth page
window.location.href = result.data;
@ -28,7 +28,7 @@ export const SignInWithApple = () => {
}
} catch (error) {
setStatusMessage(
`Error: ${error instanceof Error ? error.message : 'Could not sign in!'}`
`Error: ${error instanceof Error ? error.message : 'Could not sign in!'}`,
);
} finally {
setIsSigningIn(false);
@ -38,28 +38,25 @@ export const SignInWithApple = () => {
};
return (
<form
onSubmit={handleSignInWithApple}
className='my-4'
>
<form onSubmit={handleSignInWithApple} className='my-4'>
<SubmitButton
className='w-full cursor-pointer'
disabled={isLoading || isSigningIn}
pendingText='Redirecting...'
type="submit"
type='submit'
>
<div className='flex items-center gap-2'>
<Image src='/icons/apple.svg'
<Image
src='/icons/apple.svg'
alt='Apple logo'
className='invert-75 dark:invert-25'
width={22} height={22}
width={22}
height={22}
/>
<p className='text-[1.0rem]'>Sign in with Apple</p>
</div>
</SubmitButton>
{statusMessage && (
<StatusMessage message={{ error: statusMessage }} />
)}
{statusMessage && <StatusMessage message={{ error: statusMessage }} />}
</form>
);
};