From 1da5895e9d7ce3104d79833ec019311dad60aa27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=AA=E5=AD=90?= Date: Tue, 29 Oct 2024 09:48:00 +0800 Subject: [PATCH] Update Artalk.astro --- src/components/Artalk.astro | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/components/Artalk.astro b/src/components/Artalk.astro index b70bf05..f7da561 100644 --- a/src/components/Artalk.astro +++ b/src/components/Artalk.astro @@ -1,23 +1,5 @@ --- -import Artalk from 'artalk'; -import { useEffect } from 'react'; - -const { siteKey, siteName } = Astro.props; - -useEffect(() => { - const artalk = new Artalk({ - el: '#Comments', - site: ittst, - server: 'https://artalk.loliko.cn', - }); - - // 添加 loaded 类名以触发转场效果 - document.getElementById('artalk-container').classList.add('loaded'); - return () => { - artalk.destroy(); - }; -}, [siteKey, siteName]); --- -
\ No newline at end of file +
+ \ No newline at end of file