mirror of
https://github.com/Permissionless-Software-Foundation/psf-memo.git
synced 2026-09-21 16:52:01 -07:00
DB: GET /profile/recent joins each profile's display name (names store) and avatar URL (profilePics store) by address, reporting null when a record is absent. The join runs on the requested page only and leaves the profile order and pagination unchanged. Client: the /profile/recent table gains a leftmost Account column showing the display name and avatar, both linking to the profile, with a truncated-address fallback when the name is absent and an identicon fallback when the avatar is absent. The existing columns are preserved. Add focused unit tests, acceptance fixtures, and regex step handlers for both components. By coder.
21 lines
713 B
JavaScript
21 lines
713 B
JavaScript
/*
|
|
Acceptance rendering adapter for the Recent Profiles account cell.
|
|
|
|
Renders the same RecentProfileAccount component the browser uses to a static
|
|
HTML string, so acceptance assertions can inspect the avatar, profile links,
|
|
and display name without running a browser.
|
|
*/
|
|
|
|
'use strict'
|
|
|
|
const React = require('react')
|
|
const ReactDOMServer = require('react-dom/server')
|
|
const RecentProfileAccount = require('../../src/components/app-body/recent-profiles/recent-profile-account')
|
|
|
|
function renderRecentProfileAccount (account) {
|
|
const element = React.createElement(RecentProfileAccount, { account })
|
|
return ReactDOMServer.renderToStaticMarkup(element)
|
|
}
|
|
|
|
module.exports = { renderRecentProfileAccount }
|