refactor: Update HomePage component for React Router
This commit is contained in:
1 parent
8cd849956d
commit
7d4089058e
1 file changed
+5
-5
@@ -1,12 +1,12 @@
|
|||||||
import { Search } from 'lucide-react';
|
import { Search } from 'lucide-react';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
import { ImageWithFallback } from './figma/ImageWithFallback';
|
import { ImageWithFallback } from './figma/ImageWithFallback';
|
||||||
|
|
||||||
interface HomePageProps {
|
interface HomePageProps {
|
||||||
theme: 'light' | 'dark';
|
theme: 'light' | 'dark';
|
||||||
navigateToDocumentation: () => void;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function HomePage({ theme, navigateToDocumentation }: HomePageProps) {
|
export function HomePage({ theme }: HomePageProps) {
|
||||||
const products = [
|
const products = [
|
||||||
// Column 1
|
// Column 1
|
||||||
[
|
[
|
||||||
@@ -145,15 +145,15 @@ export function HomePage({ theme, navigateToDocumentation }: HomePageProps) {
|
|||||||
{products.map((column, columnIndex) => (
|
{products.map((column, columnIndex) => (
|
||||||
<div key={columnIndex} className="space-y-3">
|
<div key={columnIndex} className="space-y-3">
|
||||||
{column.map((product, index) => (
|
{column.map((product, index) => (
|
||||||
<button
|
<Link
|
||||||
key={index}
|
key={index}
|
||||||
onClick={navigateToDocumentation}
|
to="/contents"
|
||||||
className={`block text-left text-sm hover:underline ${
|
className={`block text-left text-sm hover:underline ${
|
||||||
theme === 'dark' ? 'text-blue-400' : 'text-blue-600'
|
theme === 'dark' ? 'text-blue-400' : 'text-blue-600'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{product}
|
{product}
|
||||||
</button>
|
</Link>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in new issue
Block a user