From 8d2512be2f0e64f60f6097ebf8c65c0815b81837 Mon Sep 17 00:00:00 2001
From: lijianan <574980606@qq.com>
Date: Mon, 26 Jun 2023 12:11:31 +0800
Subject: [PATCH] site: remove github-actions[bot] (#43182)
---
.dumi/theme/slots/Content/index.tsx | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/.dumi/theme/slots/Content/index.tsx b/.dumi/theme/slots/Content/index.tsx
index bb9cec4f24..0f9c5e9e25 100644
--- a/.dumi/theme/slots/Content/index.tsx
+++ b/.dumi/theme/slots/Content/index.tsx
@@ -104,7 +104,7 @@ type AnchorItem = {
children?: AnchorItem[];
};
-const AvatarPlaceholder = ({ num = 3 }: { num?: number }) => (
+const AvatarPlaceholder: React.FC<{ num?: number }> = ({ num = 3 }) => (
<>
{Array.from({ length: num }).map((_, i) => (
@@ -289,10 +289,14 @@ const Content: React.FC<{ children: ReactNode }> = ({ children }) => {
css={styles.contributorsList}
cache
fileName={meta.frontmatter.filename}
- renderItem={(item, loading) =>
- loading || !item ? (
-
- ) : (
+ renderItem={(item, loading) => {
+ if (!item || loading) {
+ return ;
+ }
+ if (item.username?.includes('github-actions')) {
+ return null;
+ }
+ return (
= ({ children }) => {
- )
- }
+ );
+ }}
/>
)}