Skip to content

persist onboarding tips visibility#43

Merged
seveibar merged 3 commits intotscircuit:mainfrom
mrudulpatil18:issue_38
Oct 10, 2024
Merged

persist onboarding tips visibility#43
seveibar merged 3 commits intotscircuit:mainfrom
mrudulpatil18:issue_38

Conversation

@mrudulpatil18
Copy link
Copy Markdown
Contributor

fixes #38

  • Added should_onboarding_tips_be_closed & setOnboardingTipsClosed to global store
  • Updated LandingHero to use global store for onboarding tips visibility

@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 8, 2024

@mrudulpatil18 is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

Comment thread src/components/LandingHero.tsx Outdated

export const LandingHero = () => {
const [visible, setVisible] = useState(true)
const { should_onboarding_tips_be_closed, setOnboardingTipsClosed } = useGlobalStore()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

use a selector with the global store- it will cause less react-rerenders (important react optimization)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

changes made

Copy link
Copy Markdown
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

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

very close! minor change

@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 9, 2024

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

Name Status Preview Updated (UTC)
snippets ✅ Ready (Inspect) Visit Preview Oct 9, 2024 4:26am

@seveibar
Copy link
Copy Markdown
Contributor

seveibar commented Oct 9, 2024

format failure, biome vscode extension w/ format on save or run bun format

@mrudulpatil18
Copy link
Copy Markdown
Contributor Author

format failure, biome vscode extension w/ format on save or run bun format

fixed

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.

The onboarding tips should stay closed if you refresh the page

2 participants