Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: homepage - use Link for internal links #1246

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/homepage/components-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const ComponentsSection: FC = () => {
))}
</div>
<div className="mb-4 flex w-full justify-center text-center">
<Button href="/docs/components/accordion" color="light">
<Button as={Link} href="/docs/components/accordion" color="light">
View all components
</Button>
</div>
Expand Down
8 changes: 7 additions & 1 deletion components/homepage/hero-section/hero-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { FC } from 'react';
import { HiOutlineArrowRight } from 'react-icons/hi';
import { Button } from '~/src';
import { CopyPackageInput } from './copy-package-input';
import Link from 'next/link';

export const HeroSection: FC = () => {
return (
Expand All @@ -23,7 +24,12 @@ export const HeroSection: FC = () => {
<CopyPackageInput value="npm i flowbite-react" />
<div className="justify-center sm:flex sm:justify-start">
<div className="mx-0 flex flex-row items-center gap-4 sm:gap-6">
<Button href="/docs/getting-started/introduction" size="lg" className="w-full whitespace-nowrap">
<Button
as={Link}
size="lg"
href="/docs/getting-started/introduction"
className="w-full whitespace-nowrap"
>
Get started <HiOutlineArrowRight className="ml-2 mt-1 h-4 w-4" />
</Button>
</div>
Expand Down
5 changes: 3 additions & 2 deletions components/homepage/react-section.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Image from 'next/image';
import Link from 'next/link';
import type { FC } from 'react';
import { HiOutlineArrowRight } from 'react-icons/hi';
import { Button } from '~/src';
Expand Down Expand Up @@ -75,10 +76,10 @@ export const ReactSection: FC = () => {
))}
</ul>
<div className="flex flex-row gap-4">
<Button href="/docs/getting-started/quickstart">
<Button as={Link} href="/docs/getting-started/quickstart">
Start building <HiOutlineArrowRight className="ml-2 h-5 w-5" />
</Button>
<Button href="https://github.com/themesberg/flowbite-react" color="gray">
<Button as={Link} href="https://github.com/themesberg/flowbite-react" color="gray">
View on GitHub
</Button>
</div>
Expand Down