Skip to content

Commit 4fd01e5

Browse files
SutuSebastianSutuSebastian
and
SutuSebastian
authored
fix: homepage - use Link for internal links (#1246)
Co-authored-by: SutuSebastian <[email protected]>
1 parent a6698d4 commit 4fd01e5

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

components/homepage/components-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const ComponentsSection: FC = () => {
2525
))}
2626
</div>
2727
<div className="mb-4 flex w-full justify-center text-center">
28-
<Button href="/docs/components/accordion" color="light">
28+
<Button as={Link} href="/docs/components/accordion" color="light">
2929
View all components
3030
</Button>
3131
</div>

components/homepage/hero-section/hero-section.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { FC } from 'react';
33
import { HiOutlineArrowRight } from 'react-icons/hi';
44
import { Button } from '~/src';
55
import { CopyPackageInput } from './copy-package-input';
6+
import Link from 'next/link';
67

78
export const HeroSection: FC = () => {
89
return (
@@ -23,7 +24,12 @@ export const HeroSection: FC = () => {
2324
<CopyPackageInput value="npm i flowbite-react" />
2425
<div className="justify-center sm:flex sm:justify-start">
2526
<div className="mx-0 flex flex-row items-center gap-4 sm:gap-6">
26-
<Button href="/docs/getting-started/introduction" size="lg" className="w-full whitespace-nowrap">
27+
<Button
28+
as={Link}
29+
size="lg"
30+
href="/docs/getting-started/introduction"
31+
className="w-full whitespace-nowrap"
32+
>
2733
Get started <HiOutlineArrowRight className="ml-2 mt-1 h-4 w-4" />
2834
</Button>
2935
</div>

components/homepage/react-section.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Image from 'next/image';
2+
import Link from 'next/link';
23
import type { FC } from 'react';
34
import { HiOutlineArrowRight } from 'react-icons/hi';
45
import { Button } from '~/src';
@@ -75,10 +76,10 @@ export const ReactSection: FC = () => {
7576
))}
7677
</ul>
7778
<div className="flex flex-row gap-4">
78-
<Button href="/docs/getting-started/quickstart">
79+
<Button as={Link} href="/docs/getting-started/quickstart">
7980
Start building <HiOutlineArrowRight className="ml-2 h-5 w-5" />
8081
</Button>
81-
<Button href="https://github.com/themesberg/flowbite-react" color="gray">
82+
<Button as={Link} href="https://github.com/themesberg/flowbite-react" color="gray">
8283
View on GitHub
8384
</Button>
8485
</div>

0 commit comments

Comments
 (0)