Skip to content

Commit

Permalink
using a selector with the global store
Browse files Browse the repository at this point in the history
  • Loading branch information
mrudulpatil18 authored and seveibar committed Oct 10, 2024
1 parent 603d796 commit 917161c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/LandingHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import { CreateNewSnippetHero } from "./CreateNewSnippetHero"
import { TypeBadge } from "./TypeBadge"

export const LandingHero = () => {
const { should_onboarding_tips_be_closed, setOnboardingTipsClosed } = useGlobalStore()
const { should_onboarding_tips_be_closed, setOnboardingTipsClosed } = useGlobalStore(
(state) => ({
should_onboarding_tips_be_closed: state.should_onboarding_tips_be_closed,
setOnboardingTipsClosed: state.setOnboardingTipsClosed,
})
);
const [, setLocation] = useLocation()
return (
<div className="p-6">
Expand Down

0 comments on commit 917161c

Please sign in to comment.