refactor(editor): Refactor project utils splitName (no-changelog) (#10669)

This commit is contained in:
Csaba Tuncsik
2024-09-05 09:17:46 +02:00
committed by GitHub
parent 7da234d8b1
commit e318a6323a
8 changed files with 59 additions and 55 deletions

View File

@@ -9,7 +9,16 @@ type Props = {
const props = defineProps<Props>();
const processedName = computed(() => splitName(props.project.name ?? ''));
const processedName = computed(() => {
const { name, email } = splitName(props.project.name ?? '');
const nameArray = name?.split(' ');
const lastName = nameArray?.pop() ?? '';
return {
firstName: nameArray?.join(' ') ?? '',
lastName,
email,
};
});
</script>
<template>
<div :class="$style.projectInfo" data-test-id="project-sharing-info">