diff --git a/app/(app)/event/[naddr]/_components/Header.tsx b/app/(app)/event/[naddr]/_components/Header.tsx index eac4c9e..8cc0208 100644 --- a/app/(app)/event/[naddr]/_components/Header.tsx +++ b/app/(app)/event/[naddr]/_components/Header.tsx @@ -59,14 +59,7 @@ export default function Header({ event }: { event: NDKEvent }) { const endDate = getTagValues("end", tags) ? new Date(parseInt(getTagValues("end", tags) as string) * 1000) : null; - const getLocation = () => { - let temp = getTagAllValues("location", tags); - if (temp[0]) { - return temp; - } - return getTagAllValues("address", tags); - }; - const location = getLocation(); + const location = getTagAllValues("location", tags); const rawEvent = event.rawEvent(); const priceInBTC = parseFloat(getTagValues("price", rawEvent.tags) ?? "0"); const isMember = diff --git a/app/(app)/event/[naddr]/page.tsx b/app/(app)/event/[naddr]/page.tsx index de38baa..be2afbe 100644 --- a/app/(app)/event/[naddr]/page.tsx +++ b/app/(app)/event/[naddr]/page.tsx @@ -69,9 +69,7 @@ export default function EventPage({ const { tags } = event; const eventTagId = event.tagId(); - const location = getTagAllValues("location", tags)[0] - ? getTagAllValues("location", tags) - : getTagAllValues("address", tags); + const location = getTagAllValues("location", tags) const geohash = getTagValues("g", tags); const hosts = getTagsAllValues("p", tags) .filter(([pubkey, relay, role]) => role === "host") diff --git a/app/(app)/explore/_components/CalendarCard.tsx b/app/(app)/explore/_components/CalendarCard.tsx index 6c72484..e905477 100644 --- a/app/(app)/explore/_components/CalendarCard.tsx +++ b/app/(app)/explore/_components/CalendarCard.tsx @@ -38,7 +38,7 @@ export default function CalendarCard({ calendar }: CalendarCardProps) { const image = getTagValues("image", tags); const banner = getTagValues("banner", tags) ?? profile?.image ?? profile?.banner ?? BANNER; - const description = content ?? getTagValues("about", tags); + const description = content ?? ''; const calendarEvents = getTagsValues("a", tags); const calendarEventIdentifiers = calendarEvents .filter(Boolean) diff --git a/components/Cards/CalendarEvent/LargeFeedCard.tsx b/components/Cards/CalendarEvent/LargeFeedCard.tsx index cdf93b3..11c1839 100644 --- a/components/Cards/CalendarEvent/LargeFeedCard.tsx +++ b/components/Cards/CalendarEvent/LargeFeedCard.tsx @@ -35,8 +35,7 @@ type LargeFeedCardProps = { export default function LargeFeedCard({ event }: LargeFeedCardProps) { const { tags, pubkey, content } = event; const image = getTagValues("image", tags); - const location = - getTagValues("location", tags) ?? getTagValues("address", tags); + const location = getTagValues("location", tags); const users = getTagsValues("p", tags).filter(Boolean); const startDate = getTagValues("start", tags) ? new Date(parseInt(getTagValues("start", tags) as string) * 1000) diff --git a/components/Cards/CalendarEvent/index.tsx b/components/Cards/CalendarEvent/index.tsx index 818ab65..e1ccee3 100644 --- a/components/Cards/CalendarEvent/index.tsx +++ b/components/Cards/CalendarEvent/index.tsx @@ -11,6 +11,7 @@ import { NostrEvent } from "@nostr-dev-kit/ndk"; import { getTagAllValues, getTagValues, + getTagsAllValues, getTagsValues, } from "@/lib/nostr/utils"; import useProfile from "@/lib/hooks/useProfile"; @@ -31,7 +32,6 @@ export default function CalendarEventCard({ const title = getTagValues("name", tags) || "Untitled"; const image = getTagValues("image", tags) ?? - getTagValues("picture", tags) ?? getTagValues("banner", tags) ?? profile?.banner; @@ -42,14 +42,7 @@ export default function CalendarEventCard({ const endDate = getTagValues("end", tags) ? new Date(parseInt(getTagValues("end", tags) as string) * 1000) : null; - const getLocation = () => { - let temp = getTagAllValues("location", tags); - if (temp[0]) { - return temp; - } - return getTagAllValues("address", tags); - }; - const location = getLocation(); + const location = getTagsAllValues("location", tags); const users = getTagsValues("p", tags); const hashtags = getTagsValues("t", tags); diff --git a/components/Modals/CreateCalendar.tsx b/components/Modals/CreateCalendar.tsx index 7763315..41fc33c 100644 --- a/components/Modals/CreateCalendar.tsx +++ b/components/Modals/CreateCalendar.tsx @@ -67,7 +67,6 @@ export default function CreateCalendarEventModal() { const tags: string[][] = [ ["d", random], ["name", name], - ["description", description], ["p", currentUser.pubkey, "", "host"], ]; diff --git a/components/Modals/CreateCalendarEvent.tsx b/components/Modals/CreateCalendarEvent.tsx index 06b2b0a..a611af1 100644 --- a/components/Modals/CreateCalendarEvent.tsx +++ b/components/Modals/CreateCalendarEvent.tsx @@ -121,7 +121,6 @@ export default function CreateCalendarEventModal({ const tags: string[][] = [ ["d", random], ["name", title], - ["description", description], ["start", toUnix(convertToTimezone(startDate, timezone)).toString()], ["end", toUnix(convertToTimezone(endDate, timezone)).toString()], ["start_tzid", timezone], @@ -135,12 +134,6 @@ export default function CreateCalendarEventModal({ location.name, location.address, ]); - tags.push([ - "address", - `${location.name}, ${location.address}`, - location.name, - location.address, - ]); tags.push(["g", location.geohash]); } diff --git a/components/SubscriptionCard/index.tsx b/components/SubscriptionCard/index.tsx index 2997212..b351603 100644 --- a/components/SubscriptionCard/index.tsx +++ b/components/SubscriptionCard/index.tsx @@ -38,10 +38,8 @@ export default function SubscriptionCard({ event }: { event: NDKEvent }) { const { tags } = event; const rawEvent = event.rawEvent(); const title = getTagValues("title", tags) ?? getTagValues("name", tags) ?? ""; - const image = - getTagValues("image", tags) ?? getTagValues("picture", tags) ?? BANNER; - const description = - getTagValues("description", tags) ?? getTagValues("summary", tags) ?? ""; + const image = getTagValues("image", tags) ?? BANNER; + const description = event.content ?? ""; const delegate = getTagValues("delegate", tags); const priceInBTC = parseFloat(getTagValues("price", rawEvent.tags) ?? "0");