Skip to content

Commit e4a8486

Browse files
committed
支持点击作者名称跳转
1 parent 07ef973 commit e4a8486

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/containers/extension-library.jsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,16 @@ const toCCWGalleryItem = (item) => {
257257
const credits = [];
258258
if (item.publisher) {
259259
if (item.publisher.nickname) {
260-
credits.push(item.publisher.nickname);
260+
const oid = item.publisher.oid || item.publisher._id || item.publisher.id || '';
261+
if (oid) {
262+
credits.push(
263+
<a href={`https://www.ccw.site/student/${oid}`} target="_blank" rel="noreferrer" key={oid}>
264+
{item.publisher.nickname}
265+
</a>
266+
);
267+
} else {
268+
credits.push(item.publisher.nickname);
269+
}
261270
}
262271
}
263272
return {

0 commit comments

Comments
 (0)