refactor(*):Address PR comments

This commit is contained in:
Josh Creek
2025-07-26 19:42:04 +01:00
parent bc9ce84615
commit fa38fa69ca
22 changed files with 749 additions and 412 deletions
+16 -6
View File
@@ -13,15 +13,25 @@
export let supabase: any;
async function signInWithEmail() {
// TODO use the data and error from the response
const { data, error } = await supabase.auth
.signInWithPassword({
try {
const { data, error } = await supabase.auth.signInWithPassword({
email: email,
password: password
})
.then(() => {
emitSignedInEvent();
});
if (error) {
console.error('Sign in error:', error);
alert(`Sign in failed: ${error.message}`);
return;
}
if (data) {
emitSignedInEvent();
}
} catch (err) {
console.error('Sign in error:', err);
alert('Sign in failed');
}
}
</script>