tangled
alpha
login
or
join now
margin.at
/
margin
86
fork
atom
Write on the margins of the internet. Powered by the AT Protocol.
margin.at
extension
web
atproto
comments
86
fork
atom
overview
issues
4
pulls
1
pipelines
fix: address chaining issue, lint
Henrique Dias
1 month ago
6184c544
d87f6ccc
+5
-7
3 changed files
expand all
collapse all
unified
split
web
src
lib
og.ts
pages
og-image.ts
views
core
Feed.tsx
+2
-1
web/src/lib/og.ts
···
195
195
const domain = extractDomain(source);
196
196
197
197
const title = item.title || item.target?.title || "Bookmark on Margin";
198
198
-
let description = item.description || extractBody(item.body) || item.bodyValue || "";
198
198
+
let description =
199
199
+
item.description || extractBody(item.body) || item.bodyValue || "";
199
200
if (!description) description = "A saved bookmark on Margin";
200
201
if (domain) description += ` from ${domain}`;
201
202
description = truncate(description, 200);
+2
-1
web/src/pages/og-image.ts
···
79
79
: "";
80
80
const selectorText =
81
81
item.target?.selector?.exact || item.selector?.exact || "";
82
82
-
const bodyText = extractBody(item.body) || item.bodyValue || item.text || "";
82
82
+
const bodyText =
83
83
+
extractBody(item.body) || item.bodyValue || item.text || "";
83
84
const motivation = item.motivation || "";
84
85
const targetTitle = item.target?.title || item.title || "";
85
86
+1
-5
web/src/views/core/Feed.tsx
···
82
82
});
83
83
const fetched = data?.items || [];
84
84
setItems((prev) => [...prev, ...fetched]);
85
85
-
if (data?.hasMore !== undefined) {
86
86
-
setHasMore(data.hasMore);
87
87
-
} else {
88
88
-
setHasMore(fetched.length >= LIMIT);
89
89
-
}
85
85
+
setHasMore(data.hasMore);
90
86
setOffset((prev) => prev + data.fetchedCount);
91
87
} catch (e) {
92
88
console.error(e);