firtname and lastname before username

This commit is contained in:
2025-10-22 12:01:32 +02:00
parent 91163b8a75
commit a33e2ed555
16 changed files with 495 additions and 75 deletions
+6 -1
View File
@@ -30,6 +30,7 @@ import Page from "../../layouts/Page";
import { Palette } from "../../styles";
import { FONT_FAMILY } from "../../styles/Fonts";
import Style, { gutters, size } from "../../styles/Style";
import { getArtistDisplayName } from "../../utils/artistName";
// 20 secondes
const timeBeforeIncrement = 20000;
@@ -69,7 +70,11 @@ const MusicDetails = ({ route }) => {
}, [project?.likedBy, currentUID]);
const title = project?.title || "Sans titre";
const artist = owner?.userName || "MusicLand";
const artist = useMemo(() => {
const ownerName = getArtistDisplayName(owner, "");
if (ownerName) return ownerName;
return getArtistDisplayName(project, "MusicLand");
}, [owner, project]);
const coverUrl = project?.coverUrl || null;
const songUrl = project?.songUrl || null;
+6 -1
View File
@@ -37,6 +37,7 @@ import Page from "../../layouts/Page";
import { Palette } from "../../styles";
import { FONT_FAMILY } from "../../styles/Fonts";
import Style, { gutters, size } from "../../styles/Style";
import { getArtistDisplayName } from "../../utils/artistName";
import {
formatStructureLabel,
getPromptLabelForStructure,
@@ -86,7 +87,11 @@ const MusicDetails = ({ route }) => {
}, [project?.likedBy, currentUID]);
const title = project?.title || "Sans titre";
const artist = owner?.userName || "MusicLand";
const artist = useMemo(() => {
const ownerName = getArtistDisplayName(owner, "");
if (ownerName) return ownerName;
return getArtistDisplayName(project, "MusicLand");
}, [owner, project]);
const coverUrl = project?.coverUrl || null;
const songUrl = project?.songUrl || null;
@@ -9,6 +9,7 @@ import { navigate } from "../../../navigation/NavigationService";
import { Palette, Style } from "../../../styles";
import { FONT_FAMILY } from "../../../styles/Fonts";
import { size } from "../../../styles/Style";
import { getArtistDisplayName } from "../../../utils/artistName";
import CreateLyricsHeader from "../../Writing/components/CreateLyricsHeader";
import MusicCard from "./MusicCard";
@@ -232,7 +233,7 @@ const SearchResultsList = ({
fontFamily: FONT_FAMILY.InterRegular,
}}
>
{user?.userName || "Utilisateur"}
{getArtistDisplayName(user, "Utilisateur")}
</Text>
</Pressable>
))}