mirror of
https://github.com/jcreek/LivingDexTracker.git
synced 2026-07-13 02:53:45 +00:00
fix(#64): Address PR comments
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
let email = '';
|
||||
let password = '';
|
||||
|
||||
@@ -17,13 +20,18 @@
|
||||
});
|
||||
|
||||
if (error) {
|
||||
throw error;
|
||||
console.error('Sign up error:', error);
|
||||
alert(`Sign up failed: ${error.message}`);
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle success (optional)
|
||||
} catch (error) {
|
||||
console.error('Sign up error:', error.message);
|
||||
// Handle error
|
||||
if (data) {
|
||||
// Emit signedUp event to notify parent component
|
||||
dispatch('signedUp', {});
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('Sign up error:', err);
|
||||
alert('Sign up failed');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user