优化细节

This commit is contained in:
宇阳
2024-10-15 13:00:59 +08:00
parent c19ed5b865
commit ca63771eec
2 changed files with 3 additions and 4 deletions

View File

@@ -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,
// 其他选项

View File

@@ -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 } });