-
Notifications
You must be signed in to change notification settings - Fork 5
Ernest/ Add currency selection dropdown in Ads List and Advertiser Page #534
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
base: main
Are you sure you want to change the base?
Conversation
Update function to accept optional currency parameter for ad filtering. #VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
Update function to accept optional currency parameter for ad filtering. #VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
Update function to accept optional currency parameter for ad filtering. #VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
Update API to accept account_currency and add currency filter #VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
Replace AdsAPI.getCurrencies with useAccountCurrencies hook #VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
Replace AdsAPI.getCurrencies with useAccountCurrencies hook #VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Files |
#VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
| Number(advert.completed_order_amount || 0), | ||
| currency: accountCurrency, | ||
| }, | ||
| paymentMethods: advert.payment_methods || [], |
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.
is this change needed?
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.
Reverted this change. It was unintentional.
app/ads/page.tsx
Outdated
| useEffect(() => { | ||
| if (accountCurrencies.length > 0 && !selectedCurrency) { | ||
| const defaultCurrency = accountCurrencies.find((c) => c.code === "USD")?.code || accountCurrencies[0]?.code || "" | ||
| setSelectedCurrency(defaultCurrency) | ||
| } | ||
| }, [accountCurrencies, selectedCurrency]) | ||
|
|
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.
do we need this?
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.
@farrah-deriv Here I am setting default currency to USD in case its available, else selecting the first available currency.
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.
@farrah-deriv this change is reverted.
Update workflows, tests, and components for new changes. #VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
Update workflows, tests, and components for new changes. #VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
Update workflows, tests, components, and stylesheets. #VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
Update workflows, tests, components, and global styles #VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
Eliminate duplicate logic handled in useAccountCurrencies hook. #VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
Initialize default currency and trigger fetch on selection change #VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
Use first currency from accountCurrencies as fallback in fetch. #VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
Use first currency from accountCurrencies as fallback #VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
Remove default currency useEffect and set default in fetchAds. #VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
Remove default currency useEffect and set default in fetchAds #VERCEL_SKIP Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
Update workflows, tests, components, and README. Co-authored-by: null <120568427+ernest-deriv@users.noreply.github.com>
No description provided.