Skip to content

Commit dcfac05

Browse files
committed
fix: formatting prettier causes build error
1 parent 6e35871 commit dcfac05

File tree

12 files changed

+24
-24
lines changed

12 files changed

+24
-24
lines changed

app/post/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default function PostList() {
1313
href={post.url}
1414
className="!text-inherit no-underline hover:text-inherit dark:hover:text-inherit"
1515
>
16-
<li className="mb-4 flex w-full flex-col rounded border p-4 hover:bg-slate-50 hover:shadow-sm dark:border-slate-600 dark:hover:bg-accent dark:hover:shadow-sm">
16+
<li className="dark:hover:bg-accent mb-4 flex w-full flex-col rounded border p-4 hover:bg-slate-50 dark:border-slate-600">
1717
<h5 className="font-bold">{post.title}</h5>
1818
<div className="flex justify-between">
1919
<time className="mt-2 text-sm text-slate-400">

components/layouts/error-result.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ export default function ErrorResult(props: ErrorResultProps) {
3030
<div className="text-6xl font-bold">{props.status}</div>
3131
</div>
3232

33-
<h1 className="mt-4 text-3xl font-bold tracking-tight text-foreground sm:text-4xl">
33+
<h1 className="text-foreground mt-4 text-3xl font-bold tracking-tight sm:text-4xl">
3434
{TipEnum[props.status].title}
3535
</h1>
3636

37-
<p className="mb-6 mt-4 text-sm text-muted-foreground">{TipEnum[props.status].tip}</p>
37+
<p className="text-muted-foreground mt-4 mb-6 text-sm">{TipEnum[props.status].tip}</p>
3838

3939
{props.back === 'prev' ? (
4040
<Button variant="secondary" onClick={router.back}>

components/layouts/page-footer/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import siteConfig from '~/config/siteConfig';
33

44
export default function PageFooter() {
55
return (
6-
<footer className="mt-auto box-border border-t bg-zinc-50 p-2 dark:bg-zinc-900 md:p-4">
6+
<footer className="mt-auto box-border border-t bg-zinc-50 p-2 md:p-4 dark:bg-zinc-900">
77
<div className="flex flex-col items-center space-y-4 text-center">
8-
<div className="flex flex-col items-center gap-4 text-sm text-zinc-600 dark:text-zinc-300 md:flex-row md:text-base">
8+
<div className="flex flex-col items-center gap-4 text-sm text-zinc-600 md:flex-row md:text-base dark:text-zinc-300">
99
<span aria-label="copyright">©2025 风希落</span>
1010
<Link
1111
aria-label="beian"

components/layouts/page-header/doc-search.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function DocSearch() {
3737
return (
3838
<Link
3939
href={href}
40-
className="relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-4 py-3 text-sm text-inherit outline-none hover:bg-accent hover:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"
40+
className="hover:bg-accent hover:text-accent-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-4 py-3 text-sm text-inherit outline-none select-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"
4141
>
4242
{children}
4343
</Link>
@@ -50,10 +50,10 @@ export default function DocSearch() {
5050
<div className="hidden md:block">
5151
<Button
5252
variant="outline"
53-
className="relative h-8 w-full justify-start rounded-[0.5rem] bg-muted/50 text-sm font-normal text-muted-foreground shadow-none sm:pr-12 md:w-32 lg:w-48 xl:w-56"
53+
className="bg-muted/50 text-muted-foreground relative h-8 w-full justify-start rounded-[0.5rem] text-sm font-normal shadow-none sm:pr-12 md:w-32 lg:w-48 xl:w-56"
5454
>
5555
<span className="inline-flex">Try Search</span>
56-
<kbd className="pointer-events-none absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 sm:flex">
56+
<kbd className="bg-muted pointer-events-none absolute top-[0.3rem] right-[0.3rem] hidden h-5 items-center gap-1 rounded border px-1.5 font-mono text-[10px] font-medium opacity-100 select-none sm:flex">
5757
<span className="text-xs"></span>K
5858
</kbd>
5959
</Button>
@@ -67,7 +67,7 @@ export default function DocSearch() {
6767
</DialogHeader>
6868

6969
<div className="flex items-center border-b px-3">
70-
<Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
70+
<Search className="mr-2 size-4 shrink-0 opacity-50" />
7171
<Input
7272
className="border-none focus-visible:ring-0"
7373
placeholder="搜索文章"
@@ -83,7 +83,7 @@ export default function DocSearch() {
8383
</div>
8484
)}
8585
{searchList.length > 0 && (
86-
<ScrollArea className="max-h-[300px] overflow-y-auto overflow-x-hidden px-2 py-1 text-foreground md:max-h-[calc(100vh-300px)]">
86+
<ScrollArea className="text-foreground max-h-[300px] overflow-x-hidden overflow-y-auto px-2 py-1 md:max-h-[calc(100vh-300px)]">
8787
{searchList.map((item) => {
8888
if (item.doc.type == 'heading') {
8989
return (
@@ -97,7 +97,7 @@ export default function DocSearch() {
9797
<File />
9898
<div>
9999
<div className="line-clamp-2 w-full">{item.doc.content}</div>
100-
<div className="overflow-hidden text-xs font-bold text-muted-foreground">
100+
<div className="text-muted-foreground overflow-hidden text-xs font-bold">
101101
{item.doc.headings}
102102
</div>
103103
</div>

components/layouts/page-header/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import DocSearch from './doc-search';
88

99
export default function PageHeader() {
1010
return (
11-
<header className="border-grid sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
11+
<header className="border-grid bg-background/95 supports-[backdrop-filter]:bg-background/60 sticky top-0 z-50 w-full border-b backdrop-blur">
1212
<div className="container-wrapper">
1313
<div className="container flex h-14 items-center">
1414
<PCNav />
@@ -24,10 +24,10 @@ export default function PageHeader() {
2424
asChild
2525
variant="ghost"
2626
size="icon"
27-
className="h-8 w-8 px-0"
27+
className="size-8 px-0"
2828
>
2929
<Link href={item.href} target="_blank" rel="noreferrer">
30-
<item.icon className="h-4 w-4" />
30+
<item.icon className="size-4" />
3131
<span className="sr-only">{item.title}</span>
3232
</Link>
3333
</Button>

components/layouts/page-header/mobile-nav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function MobileNav() {
2121
<DropdownMenuTrigger asChild>
2222
<Button
2323
variant="ghost"
24-
className="-ml-2 mr-2 h-8 w-8 px-0 text-base hover:bg-transparent focus-visible:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 md:hidden"
24+
className="mr-2 -ml-2 size-8 px-0 text-base hover:bg-transparent focus-visible:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 md:hidden"
2525
>
2626
<svg
2727
xmlns="http://www.w3.org/2000/svg"

components/layouts/page-header/pc-nav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default function PCNav() {
1111
<nav className="flex items-center gap-4 text-sm xl:gap-6">
1212
{siteConfig.navs.map((item) => (
1313
<Link
14-
className="px-4 py-2 text-foreground/80 hover:text-foreground/60"
14+
className="text-foreground/80 hover:text-foreground/60 px-4 py-2"
1515
href={item.href}
1616
key={item.href}
1717
>

components/layouts/page-header/theme-switcher.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default function ThemeSwitcher() {
1919
if (!mounted) return null;
2020

2121
return (
22-
<Button variant="ghost" className="group/toggle h-8 w-8 px-0" onClick={toggleTheme}>
22+
<Button variant="ghost" className="size-8 px-0" onClick={toggleTheme}>
2323
<SunIcon className="hidden [html.dark_&]:block" />
2424
<MoonIcon className="hidden [html.light_&]:block" />
2525
<span className="sr-only">Toggle theme</span>

components/layouts/toc-tree.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export default function TocTree(props: TocTreeProps) {
8989
return (
9090
<ul ref={tocRef} className="m-o list-none p-0 text-sm">
9191
{list.map(({ title, id, depth }, i) => (
92-
<li key={id} className="mb-2 mt-0 p-0">
92+
<li key={id} className="mt-0 mb-2 p-0">
9393
<a
9494
href={`#${id}`}
9595
className={cn('text-zinc-700 no-underline hover:text-blue-400 dark:text-zinc-100', {
@@ -109,7 +109,7 @@ export default function TocTree(props: TocTreeProps) {
109109
return (
110110
<Sheet>
111111
<SheetTrigger>
112-
<CircleArrowLeft className="fixed right-0 top-1/4 z-20 h-7 w-7 translate-y-1/4 text-blue-600" />
112+
<CircleArrowLeft className="fixed top-1/4 right-0 z-20 h-7 w-7 translate-y-1/4 text-blue-600" />
113113
</SheetTrigger>
114114
<SheetContent className="overflow-y-auto p-4">
115115
<SheetHeader className="sr-only">

components/markdown/m-pre.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const MPre = (props: MPreProps): ReactElement => {
5656
<button onClick={handleClick} tabIndex={0} className="copy-btn">
5757
<IconToUse
5858
className={cn(
59-
'block h-8 w-8 rounded border !bg-slate-200 p-1 text-slate-400 dark:!bg-slate-600',
59+
'block size-8 rounded border !bg-slate-200 p-1 text-slate-400 dark:!bg-slate-600',
6060
{
6161
'!bg-blue-200 text-blue-400 dark:!bg-blue-600': isCopied,
6262
},

0 commit comments

Comments
 (0)