setHover(true)}
+ onMouseLeave={() => setHover(false)}
+ >
+ {iconPosition === 'left' &&
}
+ {/* 文案 */}
+ {!!(showText && currentCount) && (
+
+ {`${currentCount || ''}${text || ''}`}
+
+ )}
+ {/* 图标 */}
+ {iconPosition === 'right' &&
}
+
+ );
+}
diff --git a/src/components/Collect.tsx b/src/components/Collect.tsx
deleted file mode 100644
index 3b938a7..0000000
--- a/src/components/Collect.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-// 期刊收藏
-
-'use client';
-
-import { useEffect, useState } from 'react';
-
-import { apiCollect } from '@/services';
-
-interface Props {
- active: boolean;
- id: string;
- type: string;
- size?: number;
- text?: string;
-}
-
-export default function Collect({ active, id, type, size = 24, text = '' }: Props) {
- const [state, setState] = useState