mirror of
https://github.com/iflytek/skillhub.git
synced 2026-10-06 02:48:28 +00:00
fix(web): ensure all page navigation uses 0-based index
Fixed remaining instances in landing.tsx and layout.tsx where page was still set to 1 instead of 0.
This commit is contained in:
parent
9811540141
commit
ebd72bc422
2 changed files with 3 additions and 3 deletions
|
|
@ -123,7 +123,7 @@ export function Layout() {
|
|||
<li>
|
||||
<Link
|
||||
to="/search"
|
||||
search={{ q: '', sort: 'relevance', page: 1 }}
|
||||
search={{ q: '', sort: 'relevance', page: 0 }}
|
||||
className="text-sm text-muted-foreground hover:text-primary transition-colors"
|
||||
>
|
||||
搜索技能
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ export function LandingPage() {
|
|||
}, [])
|
||||
|
||||
const handleSearch = (query: string) => {
|
||||
navigate({ to: '/search', search: { q: query, sort: 'relevance', page: 1 } })
|
||||
navigate({ to: '/search', search: { q: query, sort: 'relevance', page: 0 } })
|
||||
}
|
||||
|
||||
const features = [
|
||||
|
|
@ -188,7 +188,7 @@ export function LandingPage() {
|
|||
<Button
|
||||
size="lg"
|
||||
className="bg-gradient-to-r from-cyan-500 to-blue-500 hover:from-cyan-400 hover:to-blue-400 text-white font-semibold px-8 py-6 text-lg rounded-xl shadow-lg shadow-cyan-500/25 hover:shadow-cyan-500/40 transition-all duration-300 hover:scale-105"
|
||||
onClick={() => navigate({ to: '/search', search: { q: '', sort: 'relevance', page: 1 } })}
|
||||
onClick={() => navigate({ to: '/search', search: { q: '', sort: 'relevance', page: 0 } })}
|
||||
>
|
||||
探索技能
|
||||
</Button>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue