-
Notifications
You must be signed in to change notification settings - Fork 318
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
π¦ [FEAT] Create the llmMarketQuickActions
feature flag
#7558
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ 5 Skipped Deployments
|
|
||
export const MarketQuickActions = () => { | ||
const { t } = useTranslation(); | ||
const navigation = useNavigation<StackNavigationProp<Record<string, object | undefined>>>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const navigation = useNavigation<StackNavigationProp<Record<string, object | undefined>>>(); | |
const navigation = useNavigation<StackNavigatorNavigation<BaseNavigatorStackParamList>>(); |
Should works :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and it works well!
const QUICK_ACTIONS = ["SEND", "RECEIVE", "BUY", "SWAP", "STAKE"] as const; | ||
const QUICK_ACTION_DATA = { | ||
SEND: { | ||
name: "portfolio.quickActions.send", | ||
}, | ||
RECEIVE: { | ||
name: "portfolio.quickActions.deposit", | ||
}, | ||
BUY: { | ||
name: "portfolio.quickActions.buy", | ||
}, | ||
SWAP: { | ||
name: "portfolio.quickActions.swap", | ||
}, | ||
STAKE: { | ||
name: "portfolio.quickActions.stake", | ||
}, | ||
} as const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we optimize this to only define once SEND, RECEIVE, etc...
I think that we can with something like keyof typeof.
Otherwise, maybe we can do Object.keys(QUICK_ACTION_DATA) to iterate on options.
wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I did this but it required an extra type casting because the Object
keys
and entries
functions type def always collapse the type of the key to string
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
β Checklist
npx changeset
was attached.π Description
Add a first draft of the MarketQuickActions hidden behind the new
llmMarketQuickActions
feature flag.β Context
π§ Checklist for the PR Reviewers