Skip to content

Commit

Permalink
[fix] active menu
Browse files Browse the repository at this point in the history
  • Loading branch information
suu3 committed Jan 24, 2024
1 parent 28f5d5e commit da8278c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/@layout/category-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { list, active, inactive } from "./category-menu.module.css"
import { withPrefix } from "gatsby"

const CategoryMenu = ({ categories = {}, pathname = "" }) => {
const [clicked, setClicked] = useState(`/${pathname.split("/")[1]}`)
const [clicked, setClicked] = useState(pathname.split("/page/")[0])
const { totalCount, group } = categories

const listClassName = (category: string) => {
Expand Down

0 comments on commit da8278c

Please sign in to comment.