mirror of
https://github.com/acid-info/logos-press-engine.git
synced 2025-02-23 14:48:08 +00:00
support routing for nav tags
This commit is contained in:
parent
3610921a36
commit
5426bf0e6c
@ -1,12 +1,19 @@
|
||||
import styled from '@emotion/styled'
|
||||
import { FilterTags } from '@/components/FilterTags'
|
||||
import { useSearchBarContext } from '@/context/searchbar.context'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
export const NavbarFiller = () => {
|
||||
const router = useRouter()
|
||||
const { tags } = useSearchBarContext()
|
||||
|
||||
const onTagClick = (tag: string) => {
|
||||
router.push(`/search?topics=${tag}`)
|
||||
}
|
||||
|
||||
return (
|
||||
<NavbarFillerContainer>
|
||||
<FilterTags tags={tags} selectedTags={[]} />
|
||||
<FilterTags onTagClick={onTagClick} tags={tags} selectedTags={[]} />
|
||||
</NavbarFillerContainer>
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user