Skip to content

Commit 2ec246a

Browse files
committed
refactor: update layout and playground components for improved readability and performance
- Removed unused `linkItems` import from `layout.tsx`. - Updated string literals to use HTML entities for apostrophes in `layout.tsx`. - Cleaned up style object formatting in `playground/layout.tsx`. - Standardized string quotes and formatting in `playground/page.tsx`. - Replaced `img` with `Image` component in `footer.tsx` for better optimization. - Enhanced type safety in `badge.tsx` by specifying `TargetAndTransition` for `hoverAnimation`. - Updated `useDebounce` function type parameters in `underline-tabs.tsx` for better type inference.
1 parent 4a08f5a commit 2ec246a

File tree

7 files changed

+534
-404
lines changed

7 files changed

+534
-404
lines changed

src/app/(site)/contact/page.tsx

Lines changed: 376 additions & 265 deletions
Large diffs are not rendered by default.

src/app/(site)/layout.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import { baseOptions, linkItems } from "@/app/layout.config";
3+
import { baseOptions } from "@/app/layout.config";
44
import { Footer } from "@/components/footer";
55
import { GitHubIcon } from "@/components/icons";
66
import { useDarkMode } from "@/hooks/useDarkMode";
@@ -137,7 +137,7 @@ export default function SiteLayout({ children }: { children: ReactNode }) {
137137
<ComponentIcon className="bg-fd-primary text-fd-primary-foreground mb-2 rounded-md p-1" />
138138
<p className="font-medium">Data Types & Variables</p>
139139
<p className="text-fd-muted-foreground text-sm">
140-
Understand Java's primitive data types and variable
140+
Understand Java&apos;s primitive data types and variable
141141
declarations.
142142
</p>
143143
</NavbarMenuLink>
@@ -251,7 +251,6 @@ export default function SiteLayout({ children }: { children: ReactNode }) {
251251
</NavbarMenu>
252252
),
253253
},
254-
...linkItems,
255254
]}
256255
>
257256
{children}

src/app/playground/layout.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import { baseOptions } from "@/app/layout.config";
2-
import Particles from "@/components/Particles";
32
import { HomeLayout } from "fumadocs-ui/layouts/home";
43
import type { ReactNode } from "react";
54

65
export default function Layout({ children }: { children: ReactNode }) {
76
return (
87
<HomeLayout
98
{...baseOptions}
10-
style={{
11-
"--spacing-fd-container": "1280px",
12-
} as React.CSSProperties}
9+
style={
10+
{
11+
"--spacing-fd-container": "1280px",
12+
} as React.CSSProperties
13+
}
1314
>
1415
{children}
1516
</HomeLayout>

0 commit comments

Comments
 (0)