Skip to content

Commit

Permalink
fixed formatting oversight
Browse files Browse the repository at this point in the history
  • Loading branch information
mrudulpatil18 authored and seveibar committed Oct 10, 2024
1 parent 917161c commit 9ea37f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/components/LandingHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ import { CreateNewSnippetHero } from "./CreateNewSnippetHero"
import { TypeBadge } from "./TypeBadge"

export const LandingHero = () => {
const { should_onboarding_tips_be_closed, setOnboardingTipsClosed } = useGlobalStore(
(state) => ({
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 All @@ -25,7 +24,9 @@ export const LandingHero = () => {
<Button
variant="ghost"
className="text-gray-400 text-2xl"
onClick={() => setOnboardingTipsClosed(!should_onboarding_tips_be_closed)}
onClick={() =>
setOnboardingTipsClosed(!should_onboarding_tips_be_closed)
}
>
&times;
</Button>
Expand Down
5 changes: 3 additions & 2 deletions src/hooks/use-global-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type Store = {
} | null
setSession: (session: Store["session"]) => any
should_onboarding_tips_be_closed: boolean
setOnboardingTipsClosed : (closed: boolean) => any
setOnboardingTipsClosed: (closed: boolean) => any
}

export const useGlobalStore = create<Store>()(
Expand All @@ -19,7 +19,8 @@ export const useGlobalStore = create<Store>()(
session: null,
setSession: (session) => set({ session }),
should_onboarding_tips_be_closed: false,
setOnboardingTipsClosed: (closed) => set({should_onboarding_tips_be_closed: closed})
setOnboardingTipsClosed: (closed) =>
set({ should_onboarding_tips_be_closed: closed }),
}),
{
name: "session_store",
Expand Down

0 comments on commit 9ea37f7

Please sign in to comment.