From 0739c717d86770f0bddf0c68a55b1f2ad8f3b850 Mon Sep 17 00:00:00 2001 From: javayhu Date: Fri, 20 Jun 2025 01:18:48 +0800 Subject: [PATCH] chore: fix lint and format issues --- src/app/[locale]/docs/layout.tsx | 16 ++++++++-------- src/app/[locale]/providers.tsx | 2 +- src/app/api/search/route.ts | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/app/[locale]/docs/layout.tsx b/src/app/[locale]/docs/layout.tsx index 5577299..b4e07fc 100644 --- a/src/app/[locale]/docs/layout.tsx +++ b/src/app/[locale]/docs/layout.tsx @@ -64,14 +64,14 @@ export default async function DocsRootLayout({ }, ...(websiteConfig.metadata.social?.twitter ? [ - { - type: 'icon' as const, - icon: , - text: 'X', - url: websiteConfig.metadata.social.twitter, - secondary: true, - }, - ] + { + type: 'icon' as const, + icon: , + text: 'X', + url: websiteConfig.metadata.social.twitter, + secondary: true, + }, + ] : []), ], themeSwitch: { diff --git a/src/app/[locale]/providers.tsx b/src/app/[locale]/providers.tsx index 06a8ee6..82192f0 100644 --- a/src/app/[locale]/providers.tsx +++ b/src/app/[locale]/providers.tsx @@ -4,7 +4,7 @@ import { ActiveThemeProvider } from '@/components/layout/active-theme-provider'; import { PaymentProvider } from '@/components/layout/payment-provider'; import { TooltipProvider } from '@/components/ui/tooltip'; import { websiteConfig } from '@/config/website'; -import { Translations } from 'fumadocs-ui/i18n'; +import type { Translations } from 'fumadocs-ui/i18n'; import { RootProvider } from 'fumadocs-ui/provider'; import { useTranslations } from 'next-intl'; import { ThemeProvider, useTheme } from 'next-themes'; diff --git a/src/app/api/search/route.ts b/src/app/api/search/route.ts index 7092ea6..fdbc74f 100644 --- a/src/app/api/search/route.ts +++ b/src/app/api/search/route.ts @@ -56,11 +56,11 @@ const searchAPI = createI18nSearchAPI('advanced', { /** * Fumadocs 15.2.8 fixed the bug that the `locale` is not passed to the search API - * + * * ref: * https://x.com/indie_maker_fox/status/1913457083997192589 - * - * NOTICE: + * + * NOTICE: * Fumadocs 15.1.2 has a bug that the `locale` is not passed to the search API * 1. Wrap the GET handler for debugging docs search * 2. Detect locale from referer header, and add the locale parameter to the search API