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

enhanced feature controls #1208

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jacobryas4
Copy link
Contributor

  • enhanced feature controls in settings so we can disable certain features in the UI
  • new UI component to cover controls to prevent user input
  • modified useAllowAction hook to take new feature controls into consideration

@netlify
Copy link

netlify bot commented May 24, 2023

Deploy Preview for yield-v2-app ready!

Name Link
🔨 Latest commit c6c914d
🔍 Latest deploy log https://app.netlify.com/sites/yield-v2-app/deploys/646e7d1bae808a0008a62c96
😎 Deploy Preview https://deploy-preview-1208--yield-v2-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@brucedonovan brucedonovan left a comment

Choose a reason for hiding this comment

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

cool. thanks Jacob.

@@ -258,3 +259,31 @@ export const numberWithCommas = (x: number) => x.toString().replace(/\B(?=(\d{3}

export const formatValue = (x: string | number, decimals: number) =>
numberWithCommas(Number(cleanValue(x?.toString(), decimals)));

Copy link
Contributor

Choose a reason for hiding this comment

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

This all looks good. The only thing I would suggest is moving this actionControlMapping into the 'useAllowAction' hook directly. - certainly not essential, but it is pretty specific to that hook ... and will keep all concerns together.

(just FYI: Although obviously now some Yield specific functions have crept into this file, This appUtils originally started out a 'general tools' store shared for any app. - better naming is probably required. :) )

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