优化细节
This commit is contained in:
@@ -2,7 +2,7 @@ import { useMemo } from 'react';
|
||||
import { createAvatar } from '@dicebear/core';
|
||||
|
||||
// 使用指定风格头像
|
||||
import { croodles } from '@dicebear/collection';
|
||||
import { pixelArt } from '@dicebear/collection';
|
||||
|
||||
export default ({ className }: { className?: string }) => {
|
||||
const avatar = useMemo(() => {
|
||||
@@ -10,7 +10,7 @@ export default ({ className }: { className?: string }) => {
|
||||
const seed = Math.random().toString(36).substring(2, 15);
|
||||
|
||||
// 创建头像
|
||||
return createAvatar(croodles, {
|
||||
return createAvatar(pixelArt, {
|
||||
seed: seed, // 使用随机种子
|
||||
size: 128,
|
||||
// 其他选项
|
||||
|
||||
@@ -50,6 +50,7 @@ const ListItem = ({ item, type, handleApproval, handleRejection }: ListItemProps
|
||||
<div>内容:{item.content}</div>
|
||||
<div>邮箱:{item.email || '暂无'}</div>
|
||||
<div>地址:{item.url || '暂无'}</div>
|
||||
<div>所属文章:<a href={`/article/${item.articleId}`} className="hover:text-primary">{item.articleTitle || '暂无'}</a></div>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
@@ -87,8 +88,6 @@ const WorkPage = () => {
|
||||
const fetchData = async (type: Menu) => {
|
||||
if (type === "comment") {
|
||||
const { data } = await getCommentListAPI({ query: { status: 0 }, pattern: "list" });
|
||||
console.log(data, 444);
|
||||
|
||||
setCommentList(data);
|
||||
} else if (type === "link") {
|
||||
const { data } = await getLinkListAPI({ query: { status: 0 } });
|
||||
|
||||
Reference in New Issue
Block a user