mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
fix: 修复 eslint 报错
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -71,7 +71,7 @@ export async function getStaticProps({ locale }) {
|
||||
}
|
||||
}
|
||||
|
||||
export const getStaticPaths = async () => {
|
||||
export const getStaticPaths = () => {
|
||||
return {
|
||||
paths: [
|
||||
{ params: { index: [] } }, // 对应首页路径
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 路径可访问
|
||||
|
||||
@@ -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 路径可访问
|
||||
|
||||
Reference in New Issue
Block a user