usign title instead of name

This commit is contained in:
zmeyer44 2024-04-27 13:28:53 -04:00
parent fe66367c1b
commit 866628501c
5 changed files with 5 additions and 5 deletions

View File

@ -45,7 +45,7 @@ export default function Header({ event }: { event: NDKEvent }) {
const { pubkey, tags } = event; const { pubkey, tags } = event;
const { profile } = useProfile(pubkey); const { profile } = useProfile(pubkey);
const eventReference = event.tagId(); const eventReference = event.tagId();
const title = getTagValues("name", tags) ?? "Untitled"; const title = getTagValues("title", tags) ?? "Untitled";
const image = const image =
getTagValues("image", tags) ?? getTagValues("image", tags) ??
getTagValues("picture", tags) ?? getTagValues("picture", tags) ??

View File

@ -29,7 +29,7 @@ export default function RSVPButton({ event }: RSVPButtonProps) {
const { currentUser } = useCurrentUser(); const { currentUser } = useCurrentUser();
const { ndk } = useNDK(); const { ndk } = useNDK();
const eventReference = event.tagId(); const eventReference = event.tagId();
const name = getTagValues("name", event.tags); const name = getTagValues("title", event.tags);
const tickets = getTagValues("tickets", event.tags); const tickets = getTagValues("tickets", event.tags);
const price = getTagAllValues("price", event.tags); const price = getTagAllValues("price", event.tags);
const priceInBTC = parseFloat(getTagValues("price", event.tags) ?? "0"); const priceInBTC = parseFloat(getTagValues("price", event.tags) ?? "0");

View File

@ -33,7 +33,7 @@ export async function generateMetadata(
}; };
} }
const title = `${getTagValues("name", event.tags as string[][])} | Flockstr`; const title = `${getTagValues("title", event.tags as string[][])} | Flockstr`;
const images = const images =
getTagValues("image", event.tags as string[][]) ?? getTagValues("image", event.tags as string[][]) ??
getTagValues("banner", event.tags as string[][]) ?? getTagValues("banner", event.tags as string[][]) ??

View File

@ -44,7 +44,7 @@ export default function EventPage({
useEffect(() => { useEffect(() => {
if (event) { if (event) {
const { tags, content } = event; const { tags, content } = event;
const name = getTagValues("name", tags) ?? "Untitled"; const name = getTagValues("title", tags) ?? "Untitled";
const image = const image =
getTagValues("image", tags) ?? getTagValues("image", tags) ??
getTagValues("picture", tags) ?? getTagValues("picture", tags) ??

View File

@ -120,7 +120,7 @@ export default function CreateCalendarEventModal({
const random = randomId(); const random = randomId();
const tags: string[][] = [ const tags: string[][] = [
["d", random], ["d", random],
["name", title], ["title", title],
["description", description], ["description", description],
["start", toUnix(convertToTimezone(startDate, timezone)).toString()], ["start", toUnix(convertToTimezone(startDate, timezone)).toString()],
["end", toUnix(convertToTimezone(endDate, timezone)).toString()], ["end", toUnix(convertToTimezone(endDate, timezone)).toString()],