update: 更新依赖 删除shadcn

This commit is contained in:
xiaozhou233 committed 2026-10-04 22:26:20 +08:00
1 parent 812f0b291f
commit 4725e373c2
3 files changed
+418 -3621

No files matched your search

+411 -3617
View File
File diff suppressed because it is too large. Load diff
-1
View File
@@ -22,7 +22,6 @@
"tw-animate-css": "^1.4.0"
},
"devDependencies": {
"shadcn": "^4.8.2",
"@eslint/js": "^10.0.1",
"@types/node": "^24.12.4",
"@types/react": "^19.2.14",
+7 -3
View File
@@ -6,14 +6,18 @@ export function useTypewriter(text: string, speed = 100) {
useEffect(() => {
let i = 0;
setDisplayed("");
const timer = setInterval(() => {
i++;
setDisplayed(text.slice(0, i));
if (i === text.length) clearInterval(timer);
if (i === text.length) {
clearInterval(timer);
}
}, speed);
return () => clearInterval(timer);
}, [text, speed]);
return displayed;
}
}