fix: 修复 eslint 报错

This commit is contained in:
LooseLi
2025-05-27 10:06:47 +08:00
parent 3366dd4a6c
commit 84236f3cff
12 changed files with 29 additions and 22 deletions

View File

@@ -62,7 +62,10 @@ export default async function handler(
}
// 这里将用户数据写入到Notion数据库
res.redirect(302, `/auth/result?${new URLSearchParams(redirectQuery)}`)
res.redirect(
302,
`/auth/result?${new URLSearchParams(redirectQuery).toString()}`
)
} else {
const redirectQuery = { msg: params?.statusText || '请求异常' }
res.redirect(

View File

@@ -71,7 +71,7 @@ export async function getStaticProps({ locale }) {
}
}
export const getStaticPaths = async () => {
export const getStaticPaths = () => {
return {
paths: [
{ params: { index: [] } }, // 对应首页路径

View File

@@ -51,7 +51,7 @@ export async function getStaticProps({ params: { keyword }, locale }) {
}
}
export async function getStaticPaths() {
export function getStaticPaths() {
return {
paths: [{ params: { keyword: 'NotionNext' } }],
fallback: true
@@ -128,7 +128,7 @@ async function filterByMemCache(allPosts, keyword) {
// console.log('全文搜索缓存', cacheKey, page != null)
post.results = []
let hitCount = 0
for (const i in indexContent) {
for (const i of indexContent) {
const c = indexContent[i]
if (!c) {
continue

View File

@@ -50,7 +50,7 @@ export async function getStaticProps({ params: { keyword, page }, locale }) {
}
}
export async function getStaticPaths() {
export function getStaticPaths() {
return {
paths: [{ params: { keyword: 'NotionNext', page: '1' } }],
fallback: true
@@ -135,7 +135,7 @@ async function filterByMemCache(allPosts, keyword) {
// console.log('全文搜索缓存', cacheKey, page != null)
post.results = []
let hitCount = 0
for (const i in indexContent) {
for (const i of indexContent) {
const c = indexContent[i]
if (!c) {
continue

View File

@@ -37,7 +37,7 @@ export async function getStaticProps(req) {
* catch-all route for clerk
* @returns
*/
export async function getStaticPaths() {
export function getStaticPaths() {
return {
paths: [
{ params: { index: [] } }, // 使 /sign-in 路径可访问

View File

@@ -36,7 +36,7 @@ export async function getStaticProps(req) {
* catch-all route for clerk
* @returns
*/
export async function getStaticPaths() {
export function getStaticPaths() {
return {
paths: [
{ params: { index: [] } }, // 使 /sign-up 路径可访问