Refactor dialog components in ProfilePage to use markRaw for improved performance. Update EmailDialog to correctly handle email state and emit close events. ChangeSlugDialog now initializes newSlug with the creator's slug.
This commit is contained in:
@@ -35,33 +35,31 @@ const props = defineProps({
|
||||
creator: {
|
||||
required: true
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
const emits = defineEmits(['closeRequested'])
|
||||
const emits = defineEmits(['closeRequested']);
|
||||
|
||||
const email = ref(props.creator.email)
|
||||
const email = ref(props.creator.email);
|
||||
|
||||
const client = useClient()
|
||||
const client = useClient();
|
||||
const save = async () => {
|
||||
try {
|
||||
await client.post(
|
||||
`/api/creators/${props.creator.id}/email`,
|
||||
{
|
||||
"facebookUrl": facebookUrl.value
|
||||
})
|
||||
email: email.value
|
||||
});
|
||||
|
||||
props.creator.socials.facebookUrl = facebookUrl
|
||||
|
||||
emits('closeRequested')
|
||||
props.creator.email = email.value;
|
||||
emits('closeRequested');
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const cancel = () => {
|
||||
emits('closeRequested')
|
||||
}
|
||||
|
||||
emits('closeRequested');
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user