Skip to content

Commit

Permalink
docs: fix github link
Browse files Browse the repository at this point in the history
  • Loading branch information
vikiboss committed Oct 31, 2024
1 parent f2f7b43 commit a6c79bb
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions docs/docs/components/main.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import { Button, CodeBlock, ReactUseIcon, cn, useI18n, useRoutePath } from '@/components'
import { useDark, useLang, useNavigate } from 'rspress/runtime'
import { Button, ReactUseIcon, cn, useI18n, useRoutePath } from '@/components'
import { useLang, useNavigate } from 'rspress/runtime'

export function Main() {
const t = useI18n()
const isZhCN = useLang() === 'zh-cn'
const navigate = useNavigate()
// const isDark = useDark()

const [start, reference, github] = [
useRoutePath('/docs/get-started'),
useRoutePath('/reference'),
useRoutePath('/docs/overview'),
]
const github = 'https://github.com/sheinsight/react-use'
const [start, reference] = [useRoutePath('/docs/get-started'), useRoutePath('/reference')]

return (
<div className="flex flex-col items-center md:items-start gap-4 pt-20vh md:pt-12vh">
Expand Down Expand Up @@ -46,14 +43,7 @@ export function Main() {
>
{t('homepage.reference')}
</a>
<a
className="user-link"
onClick={(e) => {
e.preventDefault()
navigate(github)
}}
href={github}
>
<a className="user-link" href={github}>
{t('homepage.github')}
</a>
</div>
Expand Down

0 comments on commit a6c79bb

Please sign in to comment.