mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-09 15:07:10 +02:00
refactor: remove trailing slash from bookmark URL display
This commit is contained in:
@@ -14,8 +14,8 @@ export function Kind39701Renderer({ event }: BaseEventProps) {
|
||||
const uTag = event.tags.find((t) => t[0] === "u")?.[1];
|
||||
// If only d tag provided, assume https:// prefix
|
||||
const url = uTag || (dTag ? `https://${dTag}` : undefined);
|
||||
// Display URL without scheme for cleaner appearance
|
||||
const displayUrl = url?.replace(/^https?:\/\//, "");
|
||||
// Display URL without scheme and trailing slash for cleaner appearance
|
||||
const displayUrl = url?.replace(/^https?:\/\//, "").replace(/\/$/, "");
|
||||
|
||||
return (
|
||||
<BaseEventContainer event={event}>
|
||||
|
||||
Reference in New Issue
Block a user