Skip to content

Commit

Permalink
fix: blogs display size (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulmathur16 authored Oct 7, 2024
1 parent dc0bf99 commit a357eda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/hooks/useBlogPosts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const DEFAULT_CATEGORY = "All"

export function useBlogPosts(items: Props["items"]) {
const [activeCategory, setActiveCategory] = useState<string>(DEFAULT_CATEGORY)
const [visibleItems, setVisibleItems] = useState(5)
const [visibleItems, setVisibleItems] = useState(7)

const filteredItems = useMemo(() => {
return activeCategory === DEFAULT_CATEGORY
Expand All @@ -15,7 +15,7 @@ export function useBlogPosts(items: Props["items"]) {

const handleCategoryClick = (category: string) => {
setActiveCategory(category)
setVisibleItems(5)
setVisibleItems(7)
}

const handleLoadMore = () => {
Expand Down

0 comments on commit a357eda

Please sign in to comment.