refactor: Update HomePage component for React Router

This commit is contained in:
dahyeon committed 2025-11-15 14:46:23 +00:00
1 parent 8cd849956d
commit 7d4089058e
1 file changed
+5 -5
+5 -5
View File
@@ -1,12 +1,12 @@
import { Search } from 'lucide-react';
import { Link } from 'react-router-dom';
import { ImageWithFallback } from './figma/ImageWithFallback';
interface HomePageProps {
theme: 'light' | 'dark';
navigateToDocumentation: () => void;
}
export function HomePage({ theme, navigateToDocumentation }: HomePageProps) {
export function HomePage({ theme }: HomePageProps) {
const products = [
// Column 1
[
@@ -145,15 +145,15 @@ export function HomePage({ theme, navigateToDocumentation }: HomePageProps) {
{products.map((column, columnIndex) => (
<div key={columnIndex} className="space-y-3">
{column.map((product, index) => (
<button
<Link
key={index}
onClick={navigateToDocumentation}
to="/contents"
className={`block text-left text-sm hover:underline ${
theme === 'dark' ? 'text-blue-400' : 'text-blue-600'
}`}
>
{product}
</button>
</Link>
))}
</div>
))}