fix login card link
This commit is contained in:
@@ -31,7 +31,6 @@ export async function renderProfile(
|
|||||||
handle: string,
|
handle: string,
|
||||||
webUrl?: string,
|
webUrl?: string,
|
||||||
localOnly = false,
|
localOnly = false,
|
||||||
isLoggedIn = false,
|
|
||||||
collections: string[] = []
|
collections: string[] = []
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
// Local mode: sync, no API call. Remote mode: async with API call
|
// Local mode: sync, no API call. Remote mode: async with API call
|
||||||
@@ -52,9 +51,9 @@ export async function renderProfile(
|
|||||||
? `<img src="${avatarUrl}" alt="${escapeHtml(displayName)}" class="profile-avatar">`
|
? `<img src="${avatarUrl}" alt="${escapeHtml(displayName)}" class="profile-avatar">`
|
||||||
: `<div class="profile-avatar-placeholder"></div>`
|
: `<div class="profile-avatar-placeholder"></div>`
|
||||||
|
|
||||||
// Service icons (only for logged-in users with matching collections)
|
// Service icons (show for users with matching collections)
|
||||||
let serviceIconsHtml = ''
|
let serviceIconsHtml = ''
|
||||||
if (isLoggedIn && collections.length > 0) {
|
if (collections.length > 0) {
|
||||||
const services = getServiceLinks(handle, collections)
|
const services = getServiceLinks(handle, collections)
|
||||||
if (services.length > 0) {
|
if (services.length > 0) {
|
||||||
const iconsHtml = services.map(s => `
|
const iconsHtml = services.map(s => `
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ async function render(route: Route): Promise<void> {
|
|||||||
|
|
||||||
// Profile section
|
// Profile section
|
||||||
if (profile) {
|
if (profile) {
|
||||||
html += await renderProfile(did, profile, handle, webUrl, localOnly, isOwner, collections)
|
html += await renderProfile(did, profile, handle, webUrl, localOnly, collections)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Content section based on route type
|
// Content section based on route type
|
||||||
|
|||||||
Reference in New Issue
Block a user