diff --git a/components/AlgoliaSearchModal.js b/components/AlgoliaSearchModal.js
index fe672e44..7c6bfdcb 100644
--- a/components/AlgoliaSearchModal.js
+++ b/components/AlgoliaSearchModal.js
@@ -102,43 +102,74 @@ export default function AlgoliaSearchModal({ cRef }) {
}
return (
-
-
- {/* 模态框 */}
-
-
-
-
-
handleInputChange(e)}
- className="text-black dark:text-gray-200 bg-gray-50 dark:bg-gray-600 outline-blue-500 w-full px-4 my-2 py-1 mb-4 border rounded-md" />
-
- {/* 标签组 */}
-
-
-
-
-
-
-
- {totalHit > 0 &&
共搜索到 {totalHit} 条结果,用时 {useTime} 毫秒
}
- Algolia 提供搜索服务
-
-
- {/* 遮罩 */}
-
-
+
+ {/* 模态框 */}
+
+
+
+
handleInputChange(e)}
+ className="text-black dark:text-gray-200 bg-gray-50 dark:bg-gray-600 outline-blue-500 w-full px-4 my-2 py-1 mb-4 border rounded-md"
+ />
+
+ {/* 标签组 */}
+
+
+
+
+
+
+
+
+ {totalHit > 0 && (
+
+ 共搜索到 {totalHit} 条结果,用时 {useTime} 毫秒
+
+ )}
+
+
+
+ Algolia 提供搜索服务
+ {' '}
+
+
+
+ {/* 遮罩 */}
+
+
)
}
diff --git a/lib/algolia.js b/lib/algolia.js
index d2d9cb37..fe2f9a83 100644
--- a/lib/algolia.js
+++ b/lib/algolia.js
@@ -42,7 +42,7 @@ const uploadDataToAlgolia = async(post) => {
if (!existed || !existed?.lastEditedDate || !existed?.lastIndexDate) {
needUpdateIndex = true
} else {
- const lastEditedDate = new Date(existed.lastEditedDate)
+ const lastEditedDate = new Date(post.lastEditedDate)
const lastIndexDate = new Date(existed.lastIndexDate)
if (lastEditedDate.getTime() > lastIndexDate.getTime()) {
needUpdateIndex = true