Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/clientside refactor #215

Merged
merged 11 commits into from
Dec 14, 2023
Merged

Feature/clientside refactor #215

merged 11 commits into from
Dec 14, 2023

Conversation

nlkluth
Copy link
Member

@nlkluth nlkluth commented Dec 13, 2023

What

Moves 'use client' boundary to further down the tree

Why

Lowers bundle size by having more server components

Copy link

vercel bot commented Dec 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextjs-sanity-fe ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2023 8:37pm

@@ -0,0 +1,21 @@
"use client";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// if a single element is selected, type would be a string instead of an array.
const totalFilters = typeof selectedFilters === "string" ? (elements > 0 ? 1 : 0) : elements;
const total = filters.reduce((acc: number, { value }: FilterGroup) => {
const selectedFilters = query?.getAll(value);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sneaking in a bug fix. I broke multiple filter select before 🤭

Copy link

@colinrobertbrooks colinrobertbrooks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@nlkluth nlkluth merged commit 4d533d7 into main Dec 14, 2023
7 of 8 checks passed
@nlkluth nlkluth deleted the feature/clientside-refactor branch December 14, 2023 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants